blob: 0ec9db0a0bc684b3a0eec1431f4c6b451a30026d [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
darwineld8bef8a2014-02-11 20:13:22 +01002defined('BASEPATH') OR exit('No direct script access allowed');
Derek Jonesf4a4bd82011-10-20 12:18:42 -05003
Derek Allard2067d1a2008-11-13 22:59:24 +00004/*
5| -------------------------------------------------------------------
6| MIME TYPES
7| -------------------------------------------------------------------
Derek Jones4b9c6292011-07-01 17:40:48 -05008| This file contains an array of mime types. It is used by the
Derek Allard2067d1a2008-11-13 22:59:24 +00009| Upload class to help identify allowed file types.
10|
11*/
Phil Sturgeon39b1c112012-06-04 16:51:14 -050012return array(
13 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
14 'cpt' => 'application/mac-compactpro',
Andrey Andreev3c135222012-07-23 16:54:48 +030015 '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'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050016 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
17 'dms' => 'application/octet-stream',
18 'lha' => 'application/octet-stream',
19 'lzh' => 'application/octet-stream',
20 'exe' => array('application/octet-stream', 'application/x-msdownload'),
21 'class' => 'application/octet-stream',
kaoz70d5c711c2013-01-31 20:54:09 -050022 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050023 'so' => 'application/octet-stream',
24 'sea' => 'application/octet-stream',
25 'dll' => 'application/octet-stream',
26 'oda' => 'application/oda',
ckdarby3b0d1332013-06-06 16:30:23 -040027 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
kaoz70d5c711c2013-01-31 20:54:09 -050028 'ai' => array('application/pdf', 'application/postscript'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050029 'eps' => 'application/postscript',
30 'ps' => 'application/postscript',
31 'smi' => 'application/smil',
32 'smil' => 'application/smil',
33 'mif' => 'application/vnd.mif',
Ollie Rattue8b4869a2012-08-15 11:43:52 -050034 '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'),
Sean Fahey905c1f32014-06-03 13:46:05 -050035 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
Andrey Andreev381cfd92013-02-28 14:47:42 +020036 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050037 'wbxml' => 'application/wbxml',
38 'wmlc' => 'application/wmlc',
39 'dcr' => 'application/x-director',
40 'dir' => 'application/x-director',
41 'dxr' => 'application/x-director',
42 'dvi' => 'application/x-dvi',
43 'gtar' => 'application/x-gtar',
44 'gz' => 'application/x-gzip',
45 'gzip' => 'application/x-gzip',
Andrey Andreevd1a075d2012-06-15 23:28:52 +030046 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050047 'php4' => 'application/x-httpd-php',
48 'php3' => 'application/x-httpd-php',
49 'phtml' => 'application/x-httpd-php',
50 'phps' => 'application/x-httpd-php-source',
Andrey Andreev1106c522013-01-21 15:14:04 +020051 'js' => array('application/x-javascript', 'text/plain'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050052 'swf' => 'application/x-shockwave-flash',
53 'sit' => 'application/x-stuffit',
54 'tar' => 'application/x-tar',
55 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
vkeranov130b0552013-09-20 17:51:38 +030056 'z' => 'application/x-compress',
Phil Sturgeon39b1c112012-06-04 16:51:14 -050057 'xhtml' => 'application/xhtml+xml',
58 'xht' => 'application/xhtml+xml',
Andrey Andreevd1a075d2012-06-15 23:28:52 +030059 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
60 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050061 'mid' => 'audio/midi',
62 'midi' => 'audio/midi',
63 'mpga' => 'audio/mpeg',
64 'mp2' => 'audio/mpeg',
65 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
66 'aif' => array('audio/x-aiff', 'audio/aiff'),
67 'aiff' => array('audio/x-aiff', 'audio/aiff'),
68 'aifc' => 'audio/x-aiff',
69 'ram' => 'audio/x-pn-realaudio',
70 'rm' => 'audio/x-pn-realaudio',
71 'rpm' => 'audio/x-pn-realaudio-plugin',
72 'ra' => 'audio/x-realaudio',
73 'rv' => 'video/vnd.rn-realvideo',
74 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
Dmitry Babenko37515172013-10-04 14:46:40 +030075 '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'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050076 'gif' => 'image/gif',
77 'jpeg' => array('image/jpeg', 'image/pjpeg'),
78 'jpg' => array('image/jpeg', 'image/pjpeg'),
79 'jpe' => array('image/jpeg', 'image/pjpeg'),
Andrey Andreevac66cab2015-11-06 16:04:33 +020080 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
81 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
82 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
83 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
84 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
85 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
86 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
87 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050088 'png' => array('image/png', 'image/x-png'),
89 'tiff' => 'image/tiff',
90 'tif' => 'image/tiff',
Andrey Andreev1106c522013-01-21 15:14:04 +020091 'css' => array('text/css', 'text/plain'),
92 'html' => array('text/html', 'text/plain'),
93 'htm' => array('text/html', 'text/plain'),
94 'shtml' => array('text/html', 'text/plain'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050095 'txt' => 'text/plain',
96 'text' => 'text/plain',
97 'log' => array('text/plain', 'text/x-log'),
98 'rtx' => 'text/richtext',
99 'rtf' => 'text/rtf',
Andrey Andreev1106c522013-01-21 15:14:04 +0200100 'xml' => array('application/xml', 'text/xml', 'text/plain'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500101 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
102 'mpeg' => 'video/mpeg',
103 'mpg' => 'video/mpeg',
104 'mpe' => 'video/mpeg',
105 'qt' => 'video/quicktime',
106 'mov' => 'video/quicktime',
107 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
108 'movie' => 'video/x-sgi-movie',
109 'doc' => array('application/msword', 'application/vnd.ms-office'),
Lasha Krikhelibaad7612013-02-05 02:48:21 -0500110 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
Alex Bilbie7bd16902012-10-02 09:19:02 +0100111 'dot' => array('application/msword', 'application/vnd.ms-office'),
112 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
Andrey Andreev381cfd92013-02-28 14:47:42 +0200113 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500114 'word' => array('application/msword', 'application/octet-stream'),
115 'xl' => 'application/excel',
116 'eml' => 'message/rfc822',
117 'json' => array('application/json', 'text/json'),
118 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
119 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
120 'p12' => 'application/x-pkcs12',
121 'p7a' => 'application/x-pkcs7-signature',
122 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
123 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
124 'p7r' => 'application/x-pkcs7-certreqresp',
125 'p7s' => 'application/pkcs7-signature',
126 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
127 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
128 'der' => 'application/x-x509-ca-cert',
129 'kdb' => 'application/octet-stream',
130 'pgp' => 'application/pgp',
131 'gpg' => 'application/gpg-keys',
132 'sst' => 'application/octet-stream',
133 'csr' => 'application/octet-stream',
134 'rsa' => 'application/x-pkcs7',
135 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
136 '3g2' => 'video/3gpp2',
Intekhab Rizvi66553a02015-05-01 15:08:02 +0530137 '3gp' => array('video/3gp', 'video/3gpp'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500138 'mp4' => 'video/mp4',
139 'm4a' => 'audio/x-m4a',
Andrey Andreev7886d702015-11-16 12:02:22 +0200140 'f4v' => array('video/mp4', 'video/x-f4v'),
141 'flv' => 'video/x-flv',
dontforget14c8def2013-01-27 10:42:56 -0800142 'webm' => 'video/webm',
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500143 'aac' => 'audio/x-acc',
144 'm4u' => 'application/vnd.mpegurl',
145 'm3u' => 'text/plain',
146 'xspf' => 'application/xspf+xml',
147 'vlc' => 'application/videolan',
kaoz70d5c711c2013-01-31 20:54:09 -0500148 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500149 'au' => 'audio/x-au',
150 'ac3' => 'audio/ac3',
151 'flac' => 'audio/x-flac',
Andrey Andreevbffcdc02016-01-11 11:34:20 +0200152 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500153 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
Andrey Andreevb2457b72012-06-07 23:36:56 +0300154 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
Andrey Andreevc0f678d2012-10-24 15:14:21 +0300155 'ics' => 'text/calendar',
Andre Gardiner811e5522014-10-21 17:13:18 -0500156 'ical' => 'text/calendar',
Andrey Andreevc0f678d2012-10-24 15:14:21 +0300157 'zsh' => 'text/x-scriptzsh',
Andrey Andreev246a9fa2018-06-04 17:01:29 +0300158 '7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
159 '7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
Andrey Andreevc0f678d2012-10-24 15:14:21 +0300160 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
161 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
Andrey Andreev03eeb362014-09-08 11:35:52 +0300162 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
Ahmad Anbar4b738822014-09-11 16:34:24 +0300163 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
Ahmad Anbard929a802015-05-17 13:23:33 +0300164 'vcf' => 'text/x-vcard',
165 'srt' => array('text/srt', 'text/plain'),
Édersonfb108202015-06-22 16:52:45 -0300166 'vtt' => array('text/vtt', 'text/plain'),
Andrey Andreeva70b9612016-08-30 10:58:19 +0300167 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
168 'odc' => 'application/vnd.oasis.opendocument.chart',
169 'otc' => 'application/vnd.oasis.opendocument.chart-template',
170 'odf' => 'application/vnd.oasis.opendocument.formula',
171 'otf' => 'application/vnd.oasis.opendocument.formula-template',
172 'odg' => 'application/vnd.oasis.opendocument.graphics',
173 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
174 'odi' => 'application/vnd.oasis.opendocument.image',
175 'oti' => 'application/vnd.oasis.opendocument.image-template',
176 'odp' => 'application/vnd.oasis.opendocument.presentation',
177 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
178 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
179 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
180 'odt' => 'application/vnd.oasis.opendocument.text',
181 'odm' => 'application/vnd.oasis.opendocument.text-master',
182 'ott' => 'application/vnd.oasis.opendocument.text-template',
183 'oth' => 'application/vnd.oasis.opendocument.text-web'
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500184);