Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

When downloading a file with spaces in the filename, v36.0.3 fails to download properly

more options
When I try to download the following file with the link: https://attachments.posteli.com/posteli.com/Christian.Steiner/96acd19d-8859-404d-9f19-76ba6c448f0c/96acd19d-8859-404d-9f19-76ba6c448f0c-19 MB PDF.pdf Other browsers are fine, but Firefox doesn't handle the spaces properly and the download fails. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=firefox%20ignores%20content-disposition%20filename

Modified by NoahSUMO

All Replies (4)

more options

In order to post the link you want us to click, could you enclose it in [square brackets]?

For those generating the filename portion of the header, it would be best to replace the spaces with %20 (URI encoding for space).

more options

Here is the link that does not work because Firefox handles spaces differently than Chrome or even IE ...

https://attachments.posteli.com/posteli.com/Christian.Steiner/96acd19d-8859-404d-9f19-76ba6c448f0c/96acd19d-8859-404d-9f19-76ba6c448f0c-19 MB PDF.pdf

This is the link to where other people have been dealing with this issue.

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&...

One of the guys I know couldn't reproduce the issue with Firefox, then he upgraded to the latest version and could reproduce the issue, so it seems like in a recent Firefox release, this issue has re-occurred.

Unless this is resolved, our only course of action will be to recommend Chrome to our customers.

Modified by NoahSUMO

more options

That file isn't coming thru as a PDF file.

As already mentioned, get rid of the spaces in the file name. Plus, the server might need to be tweaked to send a proper header for pdf files so that Firefox "knows" they are PDF files and not an "ocetet-stream" of data. Unlike some other browsers, Firefox is a bit more strict about web security when downloading files; it doesn't "guess" the type of file based solely upon the file suffix, it wants the sending server to identify the file type per being sent via the header per established W3C standards.

more options

I feel it's something of a cop-out to say to your users that you won't make your site work with their preferred browser. Unless it's IE6, I agree with that.

The problem of spaces in file names is actually not a new issue. The article about this on Mozillazine was last updated in 2007: http://kb.mozillazine.org/Filenames_with_spaces_are_truncated_upon_download

If it's a PHP site, two possible workarounds are:

For file: http://jeffersonscher.com/res/PHP urlencode - Manual.pdf