This is a pretty weird problem. When I go to download a PDF from our company's website, Firefox is asking if I want to open it or download it, and here is what happens wi… (மேலும் படிக்க)
This is a pretty weird problem. When I go to download a PDF from our company's website, Firefox is asking if I want to open it or download it, and here is what happens with both options:
- Open -- It identifies the document as HTML and presents the raw PDF data (it becomes file.pdf.html)
- Download -- It downloads the file correctly as a pdf, and calls it file.pdf. The file can then be opened and correctly rendered as a PDF.
I'm assuming it is an issue with the response header-- either it is malformed or non-standard, or maybe it is just Firefox being wonky. IE, Edge, and Chrome have no problem with it.
The mime type is application/pdf, and we are using a Content-disposition: attachment; filename="file.pdf".
Hopefully this is an easy issue to fix, but this is out of my normal realm of programming. The Firefox users where I work know to download the offending files instead of immediately opening them, it would just be nice to actually fix the issue.
Oh, in case it helps, part of the HTTP response header that we are sending is telling the browser to treat the file like an attachment, so the other browsers just save it.
Thanks for any insight and help!