blob: 1f591ba6b5ae97ea6b5633153ff683b579e6271e [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'),
80 'png' => array('image/png', 'image/x-png'),
81 'tiff' => 'image/tiff',
82 'tif' => 'image/tiff',
Andrey Andreev1106c522013-01-21 15:14:04 +020083 'css' => array('text/css', 'text/plain'),
84 'html' => array('text/html', 'text/plain'),
85 'htm' => array('text/html', 'text/plain'),
86 'shtml' => array('text/html', 'text/plain'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050087 'txt' => 'text/plain',
88 'text' => 'text/plain',
89 'log' => array('text/plain', 'text/x-log'),
90 'rtx' => 'text/richtext',
91 'rtf' => 'text/rtf',
Andrey Andreev1106c522013-01-21 15:14:04 +020092 'xml' => array('application/xml', 'text/xml', 'text/plain'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -050093 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
94 'mpeg' => 'video/mpeg',
95 'mpg' => 'video/mpeg',
96 'mpe' => 'video/mpeg',
97 'qt' => 'video/quicktime',
98 'mov' => 'video/quicktime',
99 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
100 'movie' => 'video/x-sgi-movie',
101 'doc' => array('application/msword', 'application/vnd.ms-office'),
Lasha Krikhelibaad7612013-02-05 02:48:21 -0500102 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
Alex Bilbie7bd16902012-10-02 09:19:02 +0100103 'dot' => array('application/msword', 'application/vnd.ms-office'),
104 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
Andrey Andreev381cfd92013-02-28 14:47:42 +0200105 '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 -0500106 'word' => array('application/msword', 'application/octet-stream'),
107 'xl' => 'application/excel',
108 'eml' => 'message/rfc822',
109 'json' => array('application/json', 'text/json'),
110 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
111 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
112 'p12' => 'application/x-pkcs12',
113 'p7a' => 'application/x-pkcs7-signature',
114 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
115 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
116 'p7r' => 'application/x-pkcs7-certreqresp',
117 'p7s' => 'application/pkcs7-signature',
118 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
119 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
120 'der' => 'application/x-x509-ca-cert',
121 'kdb' => 'application/octet-stream',
122 'pgp' => 'application/pgp',
123 'gpg' => 'application/gpg-keys',
124 'sst' => 'application/octet-stream',
125 'csr' => 'application/octet-stream',
126 'rsa' => 'application/x-pkcs7',
127 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
128 '3g2' => 'video/3gpp2',
Intekhab Rizvi66553a02015-05-01 15:08:02 +0530129 '3gp' => array('video/3gp', 'video/3gpp'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500130 'mp4' => 'video/mp4',
131 'm4a' => 'audio/x-m4a',
132 'f4v' => 'video/mp4',
dontforget14c8def2013-01-27 10:42:56 -0800133 'webm' => 'video/webm',
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500134 'aac' => 'audio/x-acc',
135 'm4u' => 'application/vnd.mpegurl',
136 'm3u' => 'text/plain',
137 'xspf' => 'application/xspf+xml',
138 'vlc' => 'application/videolan',
kaoz70d5c711c2013-01-31 20:54:09 -0500139 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500140 'au' => 'audio/x-au',
141 'ac3' => 'audio/ac3',
142 'flac' => 'audio/x-flac',
143 'ogg' => 'audio/ogg',
144 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
Andrey Andreevb2457b72012-06-07 23:36:56 +0300145 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
Andrey Andreevc0f678d2012-10-24 15:14:21 +0300146 'ics' => 'text/calendar',
Andre Gardiner811e5522014-10-21 17:13:18 -0500147 'ical' => 'text/calendar',
Andrey Andreevc0f678d2012-10-24 15:14:21 +0300148 'zsh' => 'text/x-scriptzsh',
149 '7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
150 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
151 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
Andrey Andreev03eeb362014-09-08 11:35:52 +0300152 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
Ahmad Anbar4b738822014-09-11 16:34:24 +0300153 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
Ahmad Anbard929a802015-05-17 13:23:33 +0300154 'vcf' => 'text/x-vcard',
155 'srt' => array('text/srt', 'text/plain'),
Édersonfb108202015-06-22 16:52:45 -0300156 'vtt' => array('text/vtt', 'text/plain'),
Andrey Andreev7013cd22015-07-13 11:30:01 +0300157 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
Phil Sturgeon39b1c112012-06-04 16:51:14 -0500158);