We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(11)
http://www.iana.org/assignments/media-types/ 列出了“官方”哑剧类型,但这并不妨碍任何人制作自己的哑剧类型,但不向 IANA 注册。
http://www.iana.org/assignments/media-types/ lists the "official" mime-types, but it doesn't prevent anyone making their own an not registering it with IANA.
以下是 Apache HTTPD 社区维护的最新 mime.types:
http://svn .apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/conf/mime.types?view=annotate
Here's the most up-to-date mime.types maintained by the Apache HTTPD community:
http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/conf/mime.types?view=annotate
IANA 列出了官方的。 包含我认为有用的文件扩展名的列表是一个包含在 Debian 和 Debian 中的
/etc/mime.types
中。乌班图。Apache Web 服务器项目还维护一个列表.
IANA lists the official ones. A list which includes file extensions which I find useful is the one included as
/etc/mime.types
in Debian & Ubuntu.The Apache web server project also maintains a list.
我从许多网站和列表中收集了 MIME 类型和文件扩展名,结果如下: https ://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.txt
我还创建了一个 JSON 文件:https://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.json
如果缺少或不正确,请告诉我
I collected MIME types and file extensions from many sites and lists, and here's the result: https://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.txt
I also created a JSON file: https://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.json
Please tell me if something is missing or incorrect
iana 正在跟踪官方消息,但当然人们可以随时声明他们的消息自己的...
换句话说,您能否获得地球上的完整列表是值得怀疑的。
还要考虑 NPAPI 插件的情况,这些插件声明 MIME 类型只是为了易于访问......并且由于某种原因,这些 MIME 类型可能对您不感兴趣。
iana is tracking the official ones but of course folks can always declare their own...
In other words, it is doubtful you'll ever get the full list on the Planet.
Also consider the case of NPAPI plugins which declare MIME-types just to be be easily accessible... and these MIME-types might be not interesting to you for a reason or another.
如果您使用 Java,则可以使用 Apache Tika,这是一个用于处理文件类型的强大库。有了它,您可以轻松获得与几行 mime 类型相关的首选扩展名:
这样您就不必费力下载和解析具有关联的文件,我发现它非常舒服。这就是我完成这个技巧的方法。
If your are using Java you could use Apache Tika, which is a powerful library for dealing with file types. With it you can easily get the preferred extension related to a mime type with a couple of rows:
In this way you don't have to mess with downloading and parsing a file with the associations, I find it very comfortable. This is the way I've done the trick.
您可以在 https://drive.google.com/open 上找到一个很好的 Mime 类型表?id=0By00BwrZ8886VUg3ak9faG5mTU0
更新日期:2017 年 2 月 27 日。
我确信它能满足您所有需要的哑剧类型。
There is a good Mime Type Table you can find on https://drive.google.com/open?id=0By00BwrZ8886VUg3ak9faG5mTU0
Which is updated 27-02-2017.
I am sure that meet your all needful mime type.
Gourley 和 Totty(O'Reilly,封面上有一只松鼠)的经典著作《HTTP: The Definitive Guide》附录 D 中有一张很好的表格。截至目前看来,它是完整且最新的这本书是写成的(2002 年)。那是很久以前的事了,但您会在那里找到所有旧的最爱以及晦涩的“仅限公司”的内容。
ISBN 1-56592-509-2,http://oreilly.com/catalog/9781565925090/
There's a good table in the classic book "HTTP: The Definitive Guide" by Gourley and Totty (O'Reilly, with a squirrel on the cover) in Appendix D. It appears to be complete and up-to-date as of the time the book was written (in 2002). That was a long time ago, but you'll find all the old favorites there as well as obscure "company-only" ones.
ISBN 1-56592-509-2, http://oreilly.com/catalog/9781565925090/
这是一个易于查看的完整列表:
http://www.webmaster-toolkit .com/mime-types.shtml
Here is a full list that is easy on the eyes:
http://www.webmaster-toolkit.com/mime-types.shtml
用户 Paul Tarjan 在评论中说道:
该网站不再可用,但最新的存档是 https://web .archive.org/web/20161015175648/http://www.stdicon.com/mimetypes
请注意,该网站没有提到“application/x-zip-compressed”(这并不是因为转义斜杠)所以它并不完美。
User Paul Tarjan said in a comment:
This website is no longer available, but the most recent archive is https://web.archive.org/web/20161015175648/http://www.stdicon.com/mimetypes
Note that this site doesn't mention "application/x-zip-compressed" (and it's not because of the escaping of slashes either) so it's not perfect.
我从 Apache mime 中获取了该列表。类型(截至 2017 年 9 月 29 日周五 15:10:29 UTC),并编写了一个脚本将其转换为 json 映射。 json 对于 stackoverflow 答案来说太大了。您可以此处 mimes.json 找到它。
生成映射的脚本:
I took the list from Apache mime.types as of Fri Sep 29 15:10:29 2017 UTC and wrote a script to convert it to a json mapping. The json is too big for stackoverflow answer. You can find it here mimes.json.
script to generate the mapping: