Answer the question
In order to leave comments, you need to log in
FileReader and application/zip file
I make a new loader for my project, and in order to tell the user that the format is not supported, I check the file type that the FileReader returns. The bottom line is that the correct mime type of the file has always been returned up to this point, but as soon as I tried to take a zip file compressed with a 7zip archiver, the FileReader returned an empty string in the type field. This is observed both in chrome and in firefox, while the opera correctly determined the file type. Who among the regulars of bug trackers of these browsers can look if such a bug report or is it a feature?
Answer the question
In order to leave comments, you need to log in
You're relying on what the browser gives as a mime type for nothing. They (browsers) do not know a large number of types and cannot guarantee correct recognition, because produce it based on the extension (under windows). The surest way, in my opinion, is to find or implement the mime-magic analog in Javascript yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question