最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】常见文件的MIME的写法

工作和技术 crifan 4070浏览 0评论

折腾:

【已解决】MongoDB的GridFS中基于文件名或id去下载文件

期间,对于后续需要保存到MongoDB的GridFS中的几种,常见的文件,想要设置MIME的话,需要搞懂其应该写成什么

比如后续需要用到的:

  • 音频:

    • wma

    • mp3

    • mid

  • 图片

    • jpg

    • jpeg

    • png

  • 文本:

    • srt

    • txt

去查查:

Glossary — MongoDB Manual 3.6

“MIME

Multipurpose Internet Mail Extensions. A standard set of type and encoding definitions used to declare the encoding and type of data in multiple data storage, transmission, and email contexts. The mongofilestool provides an option to specify a MIME type to describe a file inserted into GridFS storage.”

MIME

完整的MIME类型列表 – HTTP | MDN

MIME 参考手册

MIME 类型 – HTTP | MDN

结果里面没有mp3的格式

Media Types

里也没有mp3

MIME 参考手册

里面有:

mp3:audio/mpeg

但是都没有wma

MIME  wma

audio – finding mime type of wma files using java – Stack Overflow

http://support.microsoft.com/kb/284094

https://kb.iu.edu/d/agtj

DevDemon | MIME Types for WMA and WMV files?

File Extension .WMA Details

What is MIME audio/x-ms-wma and How to Fix It?

也没找到srt

MIME srt

PHP form validation and .srt MIME type? – Stack Overflow

What is MIME application/x-subrip and How to Fix It?

Writing an EPUB Mimetype File

Re: [ietf-types] Mime Type Reg for “application/epub+zip”

MIME  mobi

Bug #916753 “mime type for .mobi files is missing” : Bugs : mime-support package : Ubuntu

HTML5 Audio & Video MIME Types « Firelight

Add MPEG-4 MIME Types e.g. .m4a · Issue #11 · Rello/audioplayer

MIME  docx

excel – What is a correct mime type for docx, pptx etc? – Stack Overflow

What are the Microsoft Office MIME Types?

【总结】

最后常见的文件的MIME整理如下:

后缀MIME
mp3
audio/mpeg
wma
audio/x-ms-wma
mid
audio/mid
m4a
audio/mp4
ogg
audio/ogg
wav
audio/wav
jpg
image/jpeg
jpeg
image/jpeg
png
image/png
srt
application/x-subrip
txt
text/plain
pdf
application/pdf
mobi
application/x-mobipocket-ebook
epub
application/epub+zip
doc
application/msword
docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document
ppt
application/vnd.ms-powerpoint
pptx
application/vnd.openxmlformats-officedocument.presentationml.presentation
xls
application/vnd.ms-excel
xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

【后记】

【已解决】python中从文件名后缀推断出MIME类型

转载请注明:在路上 » 【已解决】常见文件的MIME的写法

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
87 queries in 0.193 seconds, using 22.10MB memory