Complete MimeType list mapped to extensions

I made this array http://pastebin.com/d4ZQBe5A or http://gist.github.com/nimasdj/801b0b1a50112ea6a997 by joining all the following lists + .php extension which is missing in all of them.
please contribute to this list to make it as accurate and complete as possible.
https://gist.github.com/plasticbrain/3887245
http://pastie.org/5668002
http://pastebin.com/iuTy6K6d
total: 1223 extensions as of 16 November 2015

I did not check if this one has an extension that is not included in my list:
http://www.sitepoint.com/web-foundations/mime-types-complete-list/
as I need it as an array to compare, how can I contact Orphelie to ask it as an array?

To a moderator: How is possible to remove that preview link of gist in post above? @Mittineague

I placed a single space in front of the URL. That does the trick.

I am not sure if this kind of arrays around the net is useful at all, for example I used php’s finfo to get the mime of .xlsb, .xlsm, .xlsx, .xltm generated by excell office 2010 and see mime of all them is:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
but in the array I gave the link the mime is something else and I am affraid it still be different on another office versions! so what is the purpose of this array around the net?

I think if you read (and can understand) the RFCs you will learn much

http://www.iana.org/assignments/media-types/media-types.xhtml

I can understand RFCs, the mime of .zip is application/x-zip, you cannot do much, I asked what might be useful these arrays in php programming for?

Any time you need to reference what they might be when using finfo_file FILEINFO_MIME_TYPE ?
http://php.net/manual/en/function.finfo-file.php

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.