It's zipped and password protected with 7zip, should the mimetype be "application/7zip", or just "data/binary"? Something else?
For upload: An official list of mime types can be found at The Internet Assigned Numbers Authority (IANA) . According to their list Content-Type header for zip is application/zip . The media type for rar files, registered at IANA in 2016, is application/vnd.
A MIME attachment with the content type "application/octet-stream" is a binary file. Typically, it will be an application or a document that must be opened in an application, such as a spreadsheet or word processor.
Multipurpose Internet Mail Extension or MIME is an internet standard, encoded file format used by email programs. The mime format contains 8-bit encoded data instead of commonly used 7-bit encoding for sending email. Thus, MIME files can contain file attachments and richer character sets other than ASCII.
For detecting MIME-types, use the aptly named "mimetype" command. It has a number of options for formatting the output, it even has an option for backward compatibility to "file". But most of all, it accepts input not only as file, but also via stdin/pipe, so you can avoid temporary files when processing streams.
According to Wikipedia (7z article), the mime type of a 7zip archive is application/x-7z-compressed
, having a password on it will not change the mimetype.
If it is a zip (ie. not 7-zip file), the mimetype should be application/zip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With