File Attachment problem with spaces in filename - Some browsers have issues...
![RobotWorkshop](https://forums.parallax.com/uploads/userpics/915/nCTRZ4MIBWKDB.jpg)
Hello,
I've had issues with Firefox downloading attachments. In all cases it seems to be that there are spaces in the filename which cause the problem. It dumps the rest of the filename after the first space and as a result loses the extension for the file type. It may be that the forum isn't converting the space in the filename before sending it out to the browser.
A better solution may to avoid using spaces in filenames which prevents the issue in the first place.
If you have problems with attachments try a different browser as they all seem to act a little differently.
Robert
I've had issues with Firefox downloading attachments. In all cases it seems to be that there are spaces in the filename which cause the problem. It dumps the rest of the filename after the first space and as a result loses the extension for the file type. It may be that the forum isn't converting the space in the filename before sending it out to the browser.
A better solution may to avoid using spaces in filenames which prevents the issue in the first place.
If you have problems with attachments try a different browser as they all seem to act a little differently.
Robert
Comments
When the url is sent to the browser with the name embedded, it must be "escaped" properly. If the download code is not doing that, the browser cannot differentiate a space in a file name from a space intended to delimit parms.
Could you point me to a file here with that and I can possibly ID the issue?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
slashsplat
/* Ira Chandler */
BotConnect.com
I do believe that the issue is that the name isn't being escaped properly and that is why I brought it up. It only occurs when there are spaces in the filename. I've seen attachments like this in both the SX forum and the Propeller Forum. One post in particular has one attachment that works (uses and underline) and one that doesn't (with spaces in the name):
http://forums.parallax.com/forums/default.aspx?f=7&m=212243
It's been like that for a while and may be causing other people problems as well.
Hopefully it would be a quick fix to the forum code.
Robert
The funny thing is, one of my .net web apps also has this problem, which can easily be fixed with (obviously vb.net):
HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment; filename=""{0}""", strFileName))
Post Edited (Harrison.) : 9/26/2007 6:28:24 PM GMT