mimes.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. | -------------------------------------------------------------------
  5. | MIME TYPES
  6. | -------------------------------------------------------------------
  7. | This file contains an array of mime types. It is used by the
  8. | Upload class to help identify allowed file types.
  9. |
  10. */
  11. return array(
  12. 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
  13. 'cpt' => 'application/mac-compactpro',
  14. 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
  15. 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
  16. 'dms' => 'application/octet-stream',
  17. 'lha' => 'application/octet-stream',
  18. 'lzh' => 'application/octet-stream',
  19. 'exe' => array('application/octet-stream', 'application/x-msdownload'),
  20. 'class' => 'application/octet-stream',
  21. 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
  22. 'so' => 'application/octet-stream',
  23. 'sea' => 'application/octet-stream',
  24. 'dll' => 'application/octet-stream',
  25. 'oda' => 'application/oda',
  26. 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
  27. 'ai' => array('application/pdf', 'application/postscript'),
  28. 'eps' => 'application/postscript',
  29. 'ps' => 'application/postscript',
  30. 'smi' => 'application/smil',
  31. 'smil' => 'application/smil',
  32. 'mif' => 'application/vnd.mif',
  33. 'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
  34. 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
  35. 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
  36. 'wbxml' => 'application/wbxml',
  37. 'wmlc' => 'application/wmlc',
  38. 'dcr' => 'application/x-director',
  39. 'dir' => 'application/x-director',
  40. 'dxr' => 'application/x-director',
  41. 'dvi' => 'application/x-dvi',
  42. 'gtar' => 'application/x-gtar',
  43. 'gz' => 'application/x-gzip',
  44. 'gzip' => 'application/x-gzip',
  45. 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
  46. 'php4' => 'application/x-httpd-php',
  47. 'php3' => 'application/x-httpd-php',
  48. 'phtml' => 'application/x-httpd-php',
  49. 'phps' => 'application/x-httpd-php-source',
  50. 'js' => array('application/x-javascript', 'text/plain'),
  51. 'swf' => 'application/x-shockwave-flash',
  52. 'sit' => 'application/x-stuffit',
  53. 'tar' => 'application/x-tar',
  54. 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
  55. 'z' => 'application/x-compress',
  56. 'xhtml' => 'application/xhtml+xml',
  57. 'xht' => 'application/xhtml+xml',
  58. 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
  59. 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
  60. 'mid' => 'audio/midi',
  61. 'midi' => 'audio/midi',
  62. 'mpga' => 'audio/mpeg',
  63. 'mp2' => 'audio/mpeg',
  64. 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
  65. 'aif' => array('audio/x-aiff', 'audio/aiff'),
  66. 'aiff' => array('audio/x-aiff', 'audio/aiff'),
  67. 'aifc' => 'audio/x-aiff',
  68. 'ram' => 'audio/x-pn-realaudio',
  69. 'rm' => 'audio/x-pn-realaudio',
  70. 'rpm' => 'audio/x-pn-realaudio-plugin',
  71. 'ra' => 'audio/x-realaudio',
  72. 'rv' => 'video/vnd.rn-realvideo',
  73. 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
  74. 'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
  75. 'gif' => 'image/gif',
  76. 'jpeg' => array('image/jpeg', 'image/pjpeg'),
  77. 'jpg' => array('image/jpeg', 'image/pjpeg'),
  78. 'jpe' => array('image/jpeg', 'image/pjpeg'),
  79. 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  80. 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  81. 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  82. 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  83. 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  84. 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  85. 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  86. 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
  87. 'png' => array('image/png', 'image/x-png'),
  88. 'tiff' => 'image/tiff',
  89. 'tif' => 'image/tiff',
  90. 'css' => array('text/css', 'text/plain'),
  91. 'html' => array('text/html', 'text/plain'),
  92. 'htm' => array('text/html', 'text/plain'),
  93. 'shtml' => array('text/html', 'text/plain'),
  94. 'txt' => 'text/plain',
  95. 'text' => 'text/plain',
  96. 'log' => array('text/plain', 'text/x-log'),
  97. 'rtx' => 'text/richtext',
  98. 'rtf' => 'text/rtf',
  99. 'xml' => array('application/xml', 'text/xml', 'text/plain'),
  100. 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
  101. 'mpeg' => 'video/mpeg',
  102. 'mpg' => 'video/mpeg',
  103. 'mpe' => 'video/mpeg',
  104. 'qt' => 'video/quicktime',
  105. 'mov' => 'video/quicktime',
  106. 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
  107. 'movie' => 'video/x-sgi-movie',
  108. 'doc' => array('application/msword', 'application/vnd.ms-office'),
  109. 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
  110. 'dot' => array('application/msword', 'application/vnd.ms-office'),
  111. 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
  112. 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
  113. 'word' => array('application/msword', 'application/octet-stream'),
  114. 'xl' => 'application/excel',
  115. 'eml' => 'message/rfc822',
  116. 'json' => array('application/json', 'text/json'),
  117. 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
  118. 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
  119. 'p12' => 'application/x-pkcs12',
  120. 'p7a' => 'application/x-pkcs7-signature',
  121. 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
  122. 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
  123. 'p7r' => 'application/x-pkcs7-certreqresp',
  124. 'p7s' => 'application/pkcs7-signature',
  125. 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
  126. 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
  127. 'der' => 'application/x-x509-ca-cert',
  128. 'kdb' => 'application/octet-stream',
  129. 'pgp' => 'application/pgp',
  130. 'gpg' => 'application/gpg-keys',
  131. 'sst' => 'application/octet-stream',
  132. 'csr' => 'application/octet-stream',
  133. 'rsa' => 'application/x-pkcs7',
  134. 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
  135. '3g2' => 'video/3gpp2',
  136. '3gp' => array('video/3gp', 'video/3gpp'),
  137. 'mp4' => 'video/mp4',
  138. 'm4a' => 'audio/x-m4a',
  139. 'f4v' => array('video/mp4', 'video/x-f4v'),
  140. 'flv' => 'video/x-flv',
  141. 'webm' => 'video/webm',
  142. 'aac' => array('audio/x-aac', 'audio/aac'),
  143. 'm4u' => 'application/vnd.mpegurl',
  144. 'm3u' => 'text/plain',
  145. 'xspf' => 'application/xspf+xml',
  146. 'vlc' => 'application/videolan',
  147. 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
  148. 'au' => 'audio/x-au',
  149. 'ac3' => 'audio/ac3',
  150. 'flac' => 'audio/x-flac',
  151. 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
  152. 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
  153. 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
  154. 'ics' => 'text/calendar',
  155. 'ical' => 'text/calendar',
  156. 'zsh' => 'text/x-scriptzsh',
  157. '7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
  158. '7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
  159. 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
  160. 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
  161. 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
  162. 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
  163. 'vcf' => 'text/x-vcard',
  164. 'srt' => array('text/srt', 'text/plain'),
  165. 'vtt' => array('text/vtt', 'text/plain'),
  166. 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
  167. 'odc' => 'application/vnd.oasis.opendocument.chart',
  168. 'otc' => 'application/vnd.oasis.opendocument.chart-template',
  169. 'odf' => 'application/vnd.oasis.opendocument.formula',
  170. 'otf' => 'application/vnd.oasis.opendocument.formula-template',
  171. 'odg' => 'application/vnd.oasis.opendocument.graphics',
  172. 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
  173. 'odi' => 'application/vnd.oasis.opendocument.image',
  174. 'oti' => 'application/vnd.oasis.opendocument.image-template',
  175. 'odp' => 'application/vnd.oasis.opendocument.presentation',
  176. 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
  177. 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
  178. 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
  179. 'odt' => 'application/vnd.oasis.opendocument.text',
  180. 'odm' => 'application/vnd.oasis.opendocument.text-master',
  181. 'ott' => 'application/vnd.oasis.opendocument.text-template',
  182. 'oth' => 'application/vnd.oasis.opendocument.text-web'
  183. );