I'm doing file upload which checks file mime type in browser. It's uses jQuery File Upload Plugin and works good everywhere except one user.
For some reason file.type (html5 file api) returns " invalid/octet-stream " for pdf file (usually it's "application/pdf"). Pdf file is simple and can be opened at this pc without any problems.
Environment: Windows 7 and Firefox 40. Not reproduced in chrome or explorer.
Try deleting (or renaming/moving, for testing purposes) the file MimeTypes.rdf in the affected Firefox's profile folder .
(Under Windows this can usually be found under a path similar to c:\\Users\\[name]\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\[some id].default - or just search for "MimeTypes.rdf".)
If the PDF upload works afterwards, you encountered a Firefox bug that was first reported in 2007 ( basically the same here , reported in 2006). In a nutshell, any web site from which the user ever downloads a file has the potential to corrupt the MimeTypes.rdf file in regards to the extension of the downloaded file - maliciously or accidentally/unknowingly.
Things you can do:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.