Thursday, March 7, 2013 5:57:28 PM
Hi again!
OK, am trying to download a file via Active4D.
On Safari Mac, everything works perfectly.
However, on Firefox Mac, if the file name contains a space, it truncates the
name to just the first word of the file.
So if the file name is:
Report data.xls
what shows up in Firefox for the file name is:
Report
The code I'm using for downloading is as follows:
set response header("Content-Disposition";"attachment; filename="+$vName)
set content type("application/octet-stream")
set cache control("")
write blob($vBlob;"application/octet-stream")
where $vName is the file name, and $vBlob is the document.
I tried the following two variations:
set response header("Content-Disposition";"attachment; filename="+url
encode($vName))
set response header("Content-Disposition";"attachment; filename="+url encode
path($vName))
but both of these send the actual URL encoding as the file name, so I end up
with:
Report+data.xls
or
Report%20data.xls
as the actual file name.
Again, everything works as expected in Safari; it's Firefox that's acting
strange.
Any suggestions as to how to get around this issue? The users need to have the
actual file name saved on their computer, so I can't work around it by leaving
the encoding as the file name, then decoding it on the return upload.
Many thanks!
Michael Larue
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/