Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the correct email attachment MIME type for a zipped and password protected file?

It's zipped and password protected with 7zip, should the mimetype be "application/7zip", or just "data/binary"? Something else?

like image 784
MikeN Avatar asked Feb 04 '10 21:02

MikeN


People also ask

What MIME type is a zip file?

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.

What is attachment MIME type?

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.

What is MIME attachment to an email?

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.

How do I determine the MIME of a file?

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.


1 Answers

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

like image 54
Jeffrey Aylesworth Avatar answered Sep 27 '22 22:09

Jeffrey Aylesworth