darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 2 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 3 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 4 | /* |
| 5 | | ------------------------------------------------------------------- |
| 6 | | MIME TYPES |
| 7 | | ------------------------------------------------------------------- |
Derek Jones | 4b9c629 | 2011-07-01 17:40:48 -0500 | [diff] [blame] | 8 | | This file contains an array of mime types. It is used by the |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 9 | | Upload class to help identify allowed file types. |
| 10 | | |
| 11 | */ |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 12 | return array( |
| 13 | 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), |
| 14 | 'cpt' => 'application/mac-compactpro', |
Andrey Andreev | 3c13522 | 2012-07-23 16:54:48 +0300 | [diff] [blame] | 15 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 16 | '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', |
kaoz70 | d5c711c | 2013-01-31 20:54:09 -0500 | [diff] [blame] | 22 | 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 23 | 'so' => 'application/octet-stream', |
| 24 | 'sea' => 'application/octet-stream', |
| 25 | 'dll' => 'application/octet-stream', |
| 26 | 'oda' => 'application/oda', |
ckdarby | 3b0d133 | 2013-06-06 16:30:23 -0400 | [diff] [blame] | 27 | 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'), |
kaoz70 | d5c711c | 2013-01-31 20:54:09 -0500 | [diff] [blame] | 28 | 'ai' => array('application/pdf', 'application/postscript'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 29 | 'eps' => 'application/postscript', |
| 30 | 'ps' => 'application/postscript', |
| 31 | 'smi' => 'application/smil', |
| 32 | 'smil' => 'application/smil', |
| 33 | 'mif' => 'application/vnd.mif', |
Ollie Rattue | 8b4869a | 2012-08-15 11:43:52 -0500 | [diff] [blame] | 34 | '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 Fahey | 905c1f3 | 2014-06-03 13:46:05 -0500 | [diff] [blame] | 35 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'), |
Andrey Andreev | 381cfd9 | 2013-02-28 14:47:42 +0200 | [diff] [blame] | 36 | 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 37 | '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 Andreev | d1a075d | 2012-06-15 23:28:52 +0300 | [diff] [blame] | 46 | 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 47 | '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 Andreev | 1106c52 | 2013-01-21 15:14:04 +0200 | [diff] [blame] | 51 | 'js' => array('application/x-javascript', 'text/plain'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 52 | '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'), |
vkeranov | 130b055 | 2013-09-20 17:51:38 +0300 | [diff] [blame] | 56 | 'z' => 'application/x-compress', |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 57 | 'xhtml' => 'application/xhtml+xml', |
| 58 | 'xht' => 'application/xhtml+xml', |
Andrey Andreev | d1a075d | 2012-06-15 23:28:52 +0300 | [diff] [blame] | 59 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 61 | '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 Babenko | 3751517 | 2013-10-04 14:46:40 +0300 | [diff] [blame] | 75 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 76 | '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 Andreev | ac66cab | 2015-11-06 16:04:33 +0200 | [diff] [blame] | 80 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 88 | 'png' => array('image/png', 'image/x-png'), |
| 89 | 'tiff' => 'image/tiff', |
| 90 | 'tif' => 'image/tiff', |
Andrey Andreev | 1106c52 | 2013-01-21 15:14:04 +0200 | [diff] [blame] | 91 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 95 | 'txt' => 'text/plain', |
| 96 | 'text' => 'text/plain', |
| 97 | 'log' => array('text/plain', 'text/x-log'), |
| 98 | 'rtx' => 'text/richtext', |
| 99 | 'rtf' => 'text/rtf', |
Andrey Andreev | 1106c52 | 2013-01-21 15:14:04 +0200 | [diff] [blame] | 100 | 'xml' => array('application/xml', 'text/xml', 'text/plain'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 101 | '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 Krikheli | baad761 | 2013-02-05 02:48:21 -0500 | [diff] [blame] | 110 | 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'), |
Alex Bilbie | 7bd1690 | 2012-10-02 09:19:02 +0100 | [diff] [blame] | 111 | 'dot' => array('application/msword', 'application/vnd.ms-office'), |
| 112 | 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'), |
Andrey Andreev | 381cfd9 | 2013-02-28 14:47:42 +0200 | [diff] [blame] | 113 | 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 114 | '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 Rizvi | 66553a0 | 2015-05-01 15:08:02 +0530 | [diff] [blame] | 137 | '3gp' => array('video/3gp', 'video/3gpp'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 138 | 'mp4' => 'video/mp4', |
| 139 | 'm4a' => 'audio/x-m4a', |
Andrey Andreev | 7886d70 | 2015-11-16 12:02:22 +0200 | [diff] [blame] | 140 | 'f4v' => array('video/mp4', 'video/x-f4v'), |
| 141 | 'flv' => 'video/x-flv', |
dontforget | 14c8def | 2013-01-27 10:42:56 -0800 | [diff] [blame] | 142 | 'webm' => 'video/webm', |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 143 | 'aac' => 'audio/x-acc', |
| 144 | 'm4u' => 'application/vnd.mpegurl', |
| 145 | 'm3u' => 'text/plain', |
| 146 | 'xspf' => 'application/xspf+xml', |
| 147 | 'vlc' => 'application/videolan', |
kaoz70 | d5c711c | 2013-01-31 20:54:09 -0500 | [diff] [blame] | 148 | 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 149 | 'au' => 'audio/x-au', |
| 150 | 'ac3' => 'audio/ac3', |
| 151 | 'flac' => 'audio/x-flac', |
Andrey Andreev | bffcdc0 | 2016-01-11 11:34:20 +0200 | [diff] [blame] | 152 | 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), |
Phil Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 153 | 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), |
Andrey Andreev | b2457b7 | 2012-06-07 23:36:56 +0300 | [diff] [blame] | 154 | 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), |
Andrey Andreev | c0f678d | 2012-10-24 15:14:21 +0300 | [diff] [blame] | 155 | 'ics' => 'text/calendar', |
Andre Gardiner | 811e552 | 2014-10-21 17:13:18 -0500 | [diff] [blame] | 156 | 'ical' => 'text/calendar', |
Andrey Andreev | c0f678d | 2012-10-24 15:14:21 +0300 | [diff] [blame] | 157 | 'zsh' => 'text/x-scriptzsh', |
Andrey Andreev | 246a9fa | 2018-06-04 17:01:29 +0300 | [diff] [blame] | 158 | '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 Andreev | c0f678d | 2012-10-24 15:14:21 +0300 | [diff] [blame] | 160 | '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 Andreev | 03eeb36 | 2014-09-08 11:35:52 +0300 | [diff] [blame] | 162 | 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), |
Ahmad Anbar | 4b73882 | 2014-09-11 16:34:24 +0300 | [diff] [blame] | 163 | 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), |
Ahmad Anbar | d929a80 | 2015-05-17 13:23:33 +0300 | [diff] [blame] | 164 | 'vcf' => 'text/x-vcard', |
| 165 | 'srt' => array('text/srt', 'text/plain'), |
Éderson | fb10820 | 2015-06-22 16:52:45 -0300 | [diff] [blame] | 166 | 'vtt' => array('text/vtt', 'text/plain'), |
Andrey Andreev | a70b961 | 2016-08-30 10:58:19 +0300 | [diff] [blame] | 167 | '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 Sturgeon | 39b1c11 | 2012-06-04 16:51:14 -0500 | [diff] [blame] | 184 | ); |