MIME类型是一种标准化的方法,用于描述和分类文件和数据的格式。它是由互联网工程任务组(IETF)定义的,并在RFC 2046中进行了详细说明。MIME类型通常由两部分组成:一个主类型和一个子类型。例如,text/html
代表HTML格式的纯文本文件,而image/png
则代表PNG格式的图片文件。
以下是一些常见的MIME类型及其对应的文件扩展名的对照表:
文件扩展名 | MIME类型 |
---|---|
.aac | audio/aac |
.abw | application/x-abiword |
.apng | image/apng |
.arc | application/x-freearc |
.avi | video/x-msvideo |
.azw | application/vnd.amazon.ebook |
.bin | application/octet-stream |
.bmp | image/bmp |
.bz | application/x-bzip |
.bz2 | application/x-bzip2 |
.cda | application/x-cdf |
.csh | application/x-csh |
.css | text/css |
.csv | text/csv |
.doc | application/msword |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.eot | application/vnd.ms-fontobject |
.epub | application/epub+zip |
.gz | application/gzip |
.gif | image/gif |
.htm | text/html |
.html | text/html |
.ico | image/vnd.microsoft.icon |
.ics | text/calendar |
.jar | application/java-archive |
.jpeg | image/jpeg |
.jpg | image/jpeg |
.js | text/javascript |
.json | application/json |
.jsonld | application/ld+json |
.mid | audio/midi |
.mjs | text/javascript |
.mp3 | audio/mpeg |
.mp4 | video/mp4 |
.mpeg | video/mpeg |
.mpkg | application/vnd.apple.installer+xml |
.odp | application/vnd.oasis.opendocument.presentation |
.ods | application/vnd.oasis.opendocument.spreadsheet |
.odt | application/vnd.oasis.opendocument.text |
.oga | audio/ogg |
.ogv | video/ogg |
.ogx | application/ogg |
.opus | audio/opus |
.otf | font/otf |
.png | image/png |
.pdf | application/pdf |
.php | application/x-httpd-php |
.ppt | application/vnd.ms-powerpoint |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
.eot | application/vnd.ms-fontobject |
.png | image/png |
.pdf | application/pdf |
.php | application/x-httpd-php |
.ppt | application/ |