The closest thing I could find was System.Net.Mime.MediaTypeNames
but that doesn't seem to have everything (like json) since it seems to be more focused around email attachments.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
An enum doesn't make much sense. MIME types are open-ended. That is, the list is not finite: new types are added from time to time.
See RFC4288: Media Type Specifications and Registration Procedures
回答2:
IANA's database is most likely to be complete, but you would need to parse those pages to get a flat list.
There is also the mime.types file that comes with Apache which seems to have been derived from the said list.