I have a problem with the name of the attachment. When I call the site on google chrome, it returns a file with the correct name and extension. I tested it with Internet Explorer and it works great. The problem is only in Firefox. I call the site and it returns the first word in the file header and without extension.
For example, if I need a file called "My Report .docx", it turns a file called "My". I googled around, and it turns out this is a common problem with people, because browsers read headers in different ways. They said that the fix should indicate the file name:
Content-Disposition: attachment; filename=My Report.docx
now: (note the quotation marks)
Content-Disposition: attachment; filename="My Report.docx"
However, this did not work for me.
On chrome, he returned "My report .docx" (actually with quotation marks). Firefox returned an odd file that had the correct extension and proper name, and so far no quotes have been executed. It was the correct file size, the correct extension, and its own name, but it could not be executed. It also returns a space before and after the file name.
firefox header content-disposition
Garrett r
source share