User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:220.127.116.11) Gecko/20060111 Firefox/18.104.22.168 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:22.214.171.124) Gecko/20060111 Firefox/126.96.36.199 I have restricted uploads to *.pdf,*.zip,*.rar in a simple php upload-function. With FF 188.8.131.52 (german) i can´t upload pdf + zipfiles because my script checks for the correct mimetype. Firefox give wrong mimetypes for zip and pdf ! The results are from the global php var $_FILES['upload']['upload_type']. Reproducible: Always Steps to Reproduce: 1.Try to upload a pdf or zipfile with a simple php upload script 2.Display the contents of $_FILES with ' print_r($_FILES); ' 3.The output shows you under [type] => the mimetype. Actual Results: If a pdf is uploadfile, 'application/octetstream' is returned If upload is a zipfile, FF returned 'application/force-download'. Expected Results: Pdf´s should return 'application/pdf'. Zipfiles should return 'application/x-zip-compressed' or 'application/zip'. Internet Explorer returns- zip: application/x-zip-compressed, pdf: application/pdf Opera returns- zip: application/zip, pdf: application/pdf These are the correct and expected mimetypes.
Yeah, a bit related to bug 316143, adds wrong zip mimetype. Additional: With FF 1.07 all uploads went fine. Will check some other mimetypes soon and post results, if any differences to normal behaviour sighted.
Popular filetypes and the mimetypes that major browsers return on WinXP: ff= firefox 184.108.40.206ge ie=Iexplore6(XP) op=opera 8.0 ----------------------------------- Exe - M$ executable ff - application/x-msdownload ie - application/octet-stream op - application/x-msdownload Jpg - image ff - image/jpeg ie - image/pjpeg op - image/jpeg Png - image ff png - image/png ie png - image/x-png op png - image/png Odt - OpenOffice Document ff - application/vnd.oasis.opendocument.text ie - application/x-zip-compressed op - application/octet-stream Tgz - compressed archive ff - application/x-gtar ie - application/x-gzip-compressed op - application/x-gzip Rpm - redhat archive ff - audio/x-pn-realaudio-plugin ie - application/octet-stream op - audio/x-pn-realaudio-plugin I suggest using: zip - application/zip pdf - application/pdf Rpm.. better to set this as M$Ie does? rpm - application/octet-stream
Same problem happens for Microsoft Excel - Content-Type: text/ms-excel-file. Only Windows Firefox 1.5 is affected. Problem didn't exist in Win Firefox 1.0. XLS - Microsoft Excel ff 1.5 Win - text/ms-excel-file ff 1.5 Linux - application/vnd.ms-excel ff 1.5 Mac - application/octet-stream ff 1.0 Win - application/octet-stream ie - application/octet-stream op 8.5 Win - application/vnd.ms-excel safari 1.3 - application/vnd.ms-excel suggested - application/octet-stream (per MS's own choice in IE) (tested on Windows XP, MacOs 10.3.9, Linux Ubuntu 6.0.6) Other popular Office files (word, powerpoint) are OK.
Are these all dupes of each other? Or perhaps related to another meta-bug? Bug 373621 – File upload set mime type as application/download instead of application/pdf (edit) Bug 323462 – Sent pdf file is damaged, if sent in IE it is fine using yahoo mail (edit) Bug 336212 – Firefox won't upload pdf files from academic medical journal websites. IE will upload pdf immediately (edit) Bug 326821 – Mimetype output wrong on upload via php($_FILES -file_type) with FF 220.127.116.11 (edit)
To all problem reporters: Please read Bug 373621 Comment #5 and check mimeTypes.rdf content. Is there multiple definitions or unexpected definition for ".pdf"?
Mime Type for PDF files returned by firefox is "application/octetstream" instead of "application/octet-stream" or "application/pdf"
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME http://www.mozilla.com http://support.mozilla.com/kb/Managing+profiles http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 5-15-2010]
Version: unspecified → 1.5.0.x Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.