complete list of mime-type <-> file extension mapping

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 15:05:34
Jiří Herník

I just want to let you know, there is a new class for this in framework 4.5

System.Web.MimeMapping.GetMimeMapping(filename);

source: https://msdn.microsoft.com/en-us/library/system.web.mimemapping(v=vs.110).aspx

Using Jürgen's mime.types link and a little command line magic, you can generate the list you want very quickly:

wget -qO- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types | egrep -v ^# | awk '{ for (i=2; i<=NF; i++) {print $i" "$1}}' | sort
TheHorse

You have to install apache or nginx or something else and look at the mime.types file.

# MIME type                 Extensions
# application/3gpp-ims+xml
# application/activemessage
application/andrew-inset            ez
# application/applefile
application/applixware              aw
application/atom+xml                atom
application/atomcat+xml             atomcat
# application/atomicmail
application/atomsvc+xml             atomsvc
# application/auth-policy+xml
...
more, more, more over 1300 mine-types.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!