content
content copied to clipboard
Issue with "Common MIME types": on windows, ZIP files have application/x-zip-compressed for the type
MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
What information was incorrect, unhelpful, or incomplete?
It seems like on windows, ZIP files have application/x-zip-compressed for the type. At least in Edge and Chrome.
Specific section or headline?
What did you expect to see?
Did you test this? If so, how?
MDN Content page report details
- Folder:
en-us/web/http/basics_of_http/mime_types/common_types
- MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/http/basics_of_http/mime_types/common_types/index.md
- Last commit: https://github.com/mdn/content/commit/9071d9650fae08b4fccae27d8d27bf820ee13a9d
- Document last modified: 2022-01-24T11:34:39.000Z
It seems like on windows, ZIP files have application/x-zip-compressed for the type. At least in Edge and Chrome.
Can you explain what leads you to that conclusion? Do you have a demo or test case that can be used to confirm it?
@Jonesie
It seems like on windows, ZIP files have application/x-zip-compressed for the type. At least in Edge and Chrome.
Can you explain what leads you to that conclusion? Do you have a demo or test case that can be used to confirm it?
Closing for lack of response
I'm seeing this as well. I zip with 7zip as a ".zip" file, upload to site using standard <input>
results in type = 'x-zip-compressed'. I thought this was deprecated?
Still here, when you upload zip file (req.file
) from Windows to Node application (ExpressJS).
On Mac/Linux req.file.mimetype === 'application/zip'
.
Windows file is uploaded as 'application/x-zip-compressed'
.
Without someone providing a reproducible demo case, it seems unlikely that anybody will step in to try to resolve this.
@sideshowbarker: I think it's "Windows feature" and "no one" can do anything about it anyway.
@sideshowbarker: I think it's "Windows feature" and "no one" can do anything about it anyway.
I see. Still, I guess we could add a note to the article about it, as a heads-up at least
Same here it suddenly started showing application/x-zip-compressed
Still here, when you upload zip file (
req.file
) from Windows to Node application (ExpressJS). On Mac/Linuxreq.file.mimetype === 'application/zip'
. Windows file is uploaded as'application/x-zip-compressed'
.
I end up with
const mimeTypeMap = {
'application/zip': true,
'application/zip-compressed': true,
'application/x-zip-compressed': true,
'multipart/x-zip': true,
// 'application/octet-stream': true, /* It depends on your use case. */
};
I can verify that this is still the case, at least on Windows 10 and Server 2022 – the mimetype seen by a browser for a .zip file is application/zip-compressed
. A quick HTML/JS demo at https://jsfiddle.net/qacgoxrw/ and dragging and dropping a file in Firefox, Edge and Chrome yields:
Windows is clearly not following the IANA standard of application/zip
.