File name changed in web client - .doc extension added

Forum to discuss the Web client version of Servoy.

File name changed in web client - .doc extension added

Postby udrescu_bogdan » Fri Sep 24, 2010 12:44 pm

Hello,

I want to save a file from my servoy web client. It normally works well. But it happened some times, also on Mac and PC, that at the end of the file name, a ".doc" suffix is added.

The binaryData field is an XLS generated by a plugin

This is what I'm doing in my code:

Code: Select all
application.output("fileName: " + fileName);      

// Download file to client
plugins.file.writeFile(fileName, binaryData);


The console output with the file name is:

Code: Select all
fileName: my file.xls


But the file is downloaded on my pc with this name: my file.xls.doc
You can see in the attached image the downloaded file from Chrome.

Who add that .doc extension?

Greetings,
Bogdan.
You do not have the required permissions to view the files attached to this post.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: File name changed in web client - .doc extension added

Postby jcompagner » Fri Sep 24, 2010 1:31 pm

which browser?

maybe you encounter the content type bug, that XLS are seen as msword files and then the browser adds that extension.

you could try to use writeFile with the 3th argument whee you specify the right mimetype, i think "application/vnd.ms-excel"
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8086
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: File name changed in web client - .doc extension added

Postby udrescu_bogdan » Fri Sep 24, 2010 4:01 pm

Yes, that's was it.

Thanks a lot.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: File name changed in web client - .doc extension added

Postby maarten » Mon May 02, 2011 5:59 pm

Is there a way of downloading multiple files in one go from the webclient?
I have a selected foundset with blobs in the database, but i don't want the user to
manually click through a download dialog for each record.

Thanks,
Maarten.
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: File name changed in web client - .doc extension added

Postby jcompagner » Mon May 02, 2011 6:11 pm

can't you merge it (zip it) and then download as one go?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8086
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: File name changed in web client - .doc extension added

Postby maarten » Mon May 02, 2011 7:21 pm

No they have to remain seperate pdf's
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: File name changed in web client - .doc extension added

Postby jcompagner » Tue May 03, 2011 9:33 am

then as far as i see you have to create X number of download links
You can't do that in the webclient in one go.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8086
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: File name changed in web client - .doc extension added

Postby Harjo » Tue May 03, 2011 10:05 am

We had a similar thing, we have choosen, to give the client two options

1. one pdf (merged) directly in webclient
2. one mail, with all seperate pdf's

And I must say, working great! :-)
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4289
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: File name changed in web client - .doc extension added

Postby maarten » Tue May 03, 2011 10:36 am

Thanks for the tip Harjo.
I was also considering email as an alternative.
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: File name changed in web client - .doc extension added

Postby maarten » Tue May 10, 2011 1:03 pm

Is there a way to zip the files?
Email is not a good alternative bcause of spamfilter blocks etc..
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: File name changed in web client - .doc extension added

Postby Harjo » Tue May 10, 2011 1:11 pm

yes, the it2be tools plugin, can do that!
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4289
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 4 guests

cron