Mime type of uploaded zip file is application/octet

I have a simple file upload that only allows zip files. On my machine (Windows 7, Firefox 19.0.2) it works fine. On another machine (Windows 8, Firefox 19.0.2) the file type check fails when I upload the same file.

On the Windows 8 machine the mime type of the .zip is application/octet . Why? Also, I haven't come across this mime type before. I was expecting application/octet-stream .

What is application/octet used for and why is it different on the other machine?


Never heard of application/octet . Guessing it is just equivalent to application/octet-stream . It is just the catch all anyway.

Maybe take a look at this: http://msdn.microsoft.com/en-us/library/ms775147%28v=vs.85%29.aspx

The MIME types "text/plain" and "application/octet-stream" are termed ambiguous because they generally do not provide clear indications of which application or CLSID should be associated as the content handler...

...and defaulting to the final determined MIME type of "application/octet-stream." Other types of files, such as .reg files, behave similarly.

Finally, if no file name extension is found, or one is found with no associated MIME type or registered application, the MIME type "text/plain" is returned if the data scan indicated predominantly text, or "application/octet-stream" if the data scan indicated binary, because this is the furthest correct determination that could be made.

链接地址: http://www.djcxy.com/p/47026.html

上一篇: 在PHP中检查“Magic Bytes”或Mime类型?

下一篇: Mime上传的zip文件类型是application / octet