31 public const MIME_EXTENSIONS = [
32 'application/ogg' => [
'ogx',
'ogg',
'ogm',
'ogv',
'oga',
'spx',
'opus' ],
33 'application/pdf' => [
'pdf' ],
34 'application/vnd.ms-opentype' => [
'otf' ],
35 'application/vnd.oasis.opendocument.chart' => [
'odc' ],
36 'application/vnd.oasis.opendocument.chart-template' => [
'otc' ],
37 'application/vnd.oasis.opendocument.database' => [
'odb' ],
38 'application/vnd.oasis.opendocument.formula' => [
'odf' ],
39 'application/vnd.oasis.opendocument.formula-template' => [
'otf' ],
40 'application/vnd.oasis.opendocument.graphics' => [
'odg' ],
41 'application/vnd.oasis.opendocument.graphics-template' => [
'otg' ],
42 'application/vnd.oasis.opendocument.image' => [
'odi' ],
43 'application/vnd.oasis.opendocument.image-template' => [
'oti' ],
44 'application/vnd.oasis.opendocument.presentation' => [
'odp' ],
45 'application/vnd.oasis.opendocument.presentation-template' => [
'otp' ],
46 'application/vnd.oasis.opendocument.spreadsheet' => [
'ods' ],
47 'application/vnd.oasis.opendocument.spreadsheet-template' => [
'ots' ],
48 'application/vnd.oasis.opendocument.text' => [
'odt' ],
49 'application/vnd.oasis.opendocument.text-master' => [
'otm',
'odm' ],
50 'application/vnd.oasis.opendocument.text-template' => [
'ott' ],
51 'application/vnd.oasis.opendocument.text-web' => [
'oth' ],
52 'application/javascript' => [
'js' ],
53 'application/x-shockwave-flash' => [
'swf' ],
54 'audio/midi' => [
'mid',
'midi',
'kar' ],
55 'audio/mpeg' => [
'mpga',
'mpa',
'mp2',
'mp3' ],
56 'audio/x-aiff' => [
'aif',
'aiff',
'aifc' ],
57 'audio/x-wav' => [
'wav' ],
58 'audio/ogg' => [
'oga',
'spx',
'ogg',
'opus' ],
59 'audio/opus' => [
'opus',
'ogg',
'oga',
'spx' ],
60 'image/x-bmp' => [
'bmp' ],
61 'image/gif' => [
'gif' ],
62 'image/jpeg' => [
'jpeg',
'jpg',
'jpe' ],
63 'image/png' => [
'png',
'apng' ],
64 'image/svg+xml' => [
'svg' ],
65 'image/svg' => [
'svg' ],
66 'image/tiff' => [
'tiff',
'tif' ],
67 'image/vnd.djvu' => [
'djvu',
'djv' ],
68 'image/x.djvu' => [
'djvu' ],
69 'image/x-djvu' => [
'djvu' ],
70 'image/x-portable-pixmap' => [
'ppm' ],
71 'image/x-xcf' => [
'xcf' ],
72 'text/plain' => [
'txt' ],
73 'text/html' => [
'html',
'htm' ],
74 'video/ogg' => [
'ogv',
'ogm',
'ogg' ],
75 'video/mpeg' => [
'mpg',
'mpeg',
'mpe' ],
76 'application/acad' => [
'dwg' ],
77 'application/andrew-inset' => [
'ez' ],
78 'application/mac-binhex40' => [
'hqx' ],
79 'application/mac-compactpro' => [
'cpt' ],
80 'application/mathml+xml' => [
'mathml' ],
81 'application/msword' => [
'doc',
'dot' ],
82 'application/octet-stream' => [
'bin',
'dms',
'lha',
'lzh',
'exe',
'class',
'so',
'dll' ],
83 'application/oda' => [
'oda' ],
84 'application/postscript' => [
'ai',
'eps',
'ps' ],
85 'application/rdf+xml' => [
'rdf' ],
86 'application/smil' => [
'smi',
'smil' ],
87 'application/srgs' => [
'gram' ],
88 'application/srgs+xml' => [
'grxml' ],
89 'application/vnd.mif' => [
'mif' ],
90 'application/vnd.ms-excel' => [
'xls',
'xlt',
'xla' ],
91 'application/vnd.ms-powerpoint' => [
'ppt',
'pot',
'pps',
'ppa' ],
92 'application/vnd.wap.wbxml' => [
'wbxml' ],
93 'application/vnd.wap.wmlc' => [
'wmlc' ],
94 'application/vnd.wap.wmlscriptc' => [
'wmlsc' ],
95 'application/voicexml+xml' => [
'vxml' ],
96 'application/x-7z-compressed' => [
'7z' ],
97 'application/x-bcpio' => [
'bcpio' ],
98 'application/x-bzip' => [
'bz' ],
99 'application/x-bzip2' => [
'bz2' ],
100 'application/x-cdlink' => [
'vcd' ],
101 'application/x-chess-pgn' => [
'pgn' ],
102 'application/x-cpio' => [
'cpio' ],
103 'application/x-csh' => [
'csh' ],
104 'application/x-dia-diagram' => [
'dia' ],
105 'application/x-director' => [
'dcr',
'dir',
'dxr' ],
106 'application/x-dvi' => [
'dvi' ],
107 'application/x-futuresplash' => [
'spl' ],
108 'application/x-gtar' => [
'gtar',
'tar' ],
109 'application/x-gzip' => [
'gz' ],
110 'application/x-hdf' => [
'hdf' ],
111 'application/x-jar' => [
'jar' ],
112 'application/json' => [
'json' ],
113 'application/x-koan' => [
'skp',
'skd',
'skt',
'skm' ],
114 'application/x-latex' => [
'latex' ],
115 'application/x-netcdf' => [
'nc',
'cdf' ],
116 'application/x-sh' => [
'sh' ],
117 'application/x-shar' => [
'shar' ],
118 'application/x-stuffit' => [
'sit' ],
119 'application/x-sv4cpio' => [
'sv4cpio' ],
120 'application/x-sv4crc' => [
'sv4crc' ],
121 'application/x-tar' => [
'tar' ],
122 'application/x-tcl' => [
'tcl' ],
123 'application/x-tex' => [
'tex' ],
124 'application/x-texinfo' => [
'texinfo',
'texi' ],
125 'application/x-troff' => [
't',
'tr',
'roff' ],
126 'application/x-troff-man' => [
'man' ],
127 'application/x-troff-me' => [
'me' ],
128 'application/x-troff-ms' => [
'ms' ],
129 'application/x-ustar' => [
'ustar' ],
130 'application/x-wais-source' => [
'src' ],
131 'application/x-xpinstall' => [
'xpi' ],
132 'application/xhtml+xml' => [
'xhtml',
'xht' ],
133 'application/xslt+xml' => [
'xslt' ],
134 'application/xml' => [
'xml',
'xsl',
'xsd',
'kml' ],
135 'application/xml-dtd' => [
'dtd' ],
137 [
'zip',
'jar',
'xpi',
'sxc',
'stc',
'sxd',
'std',
'sxi',
'sti',
'sxm',
'stm',
'sxw',
'stw' ],
138 'application/x-rar' => [
'rar' ],
139 'application/font-sfnt' => [
'ttf' ],
140 'application/font-woff' => [
'woff' ],
141 'application/font-woff2' => [
'woff2' ],
142 'application/vnd.ms-fontobject' => [
'eot' ],
143 'application/x-font-ttf' => [
'ttf' ],
144 'audio/basic' => [
'au',
'snd' ],
145 'video/webm' => [
'webm' ],
146 'audio/webm' => [
'webm' ],
147 'audio/x-matroska' => [
'mka',
'mkv' ],
148 'audio/x-mpegurl' => [
'm3u' ],
149 'audio/x-ogg' => [
'oga',
'ogg',
'spx',
'opus' ],
150 'audio/x-pn-realaudio' => [
'ram',
'rm' ],
151 'audio/x-pn-realaudio-plugin' => [
'rpm' ],
152 'audio/x-realaudio' => [
'ra' ],
153 'audio/wav' => [
'wav' ],
154 'audio/x-flac' => [
'flac' ],
155 'audio/flac' => [
'flac' ],
156 'chemical/x-pdb' => [
'pdb' ],
157 'chemical/x-xyz' => [
'xyz' ],
158 'image/bmp' => [
'bmp' ],
159 'image/cgm' => [
'cgm' ],
160 'image/ief' => [
'ief' ],
161 'image/jp2' => [
'j2k',
'jp2',
'jpg2' ],
162 'image/vnd.microsoft.icon' => [
'ico' ],
163 'image/vnd.wap.wbmp' => [
'wbmp' ],
164 'image/webp' => [
'webp' ],
165 'image/x-cmu-raster' => [
'ras' ],
166 'image/x-icon' => [
'ico' ],
167 'image/x-ms-bmp' => [
'bmp' ],
168 'image/x-portable-anymap' => [
'pnm' ],
169 'image/x-portable-bitmap' => [
'pbm' ],
170 'image/x-portable-graymap' => [
'pgm' ],
171 'image/x-rgb' => [
'rgb' ],
172 'image/x-photoshop' => [
'psd' ],
173 'image/x-xbitmap' => [
'xbm' ],
174 'image/x-xpixmap' => [
'xpm' ],
175 'image/x-xwindowdump' => [
'xwd' ],
176 'model/iges' => [
'igs',
'iges' ],
177 'model/mesh' => [
'msh',
'mesh',
'silo' ],
178 'model/vrml' => [
'wrl',
'vrml' ],
179 'text/calendar' => [
'ics',
'ifb' ],
180 'text/css' => [
'css' ],
181 'text/csv' => [
'csv' ],
182 'text/richtext' => [
'rtx' ],
183 'text/rtf' => [
'rtf' ],
184 'text/sgml' => [
'sgml',
'sgm' ],
185 'text/tab-separated-values' => [
'tsv' ],
186 'text/vnd.wap.wml' => [
'wml' ],
187 'text/vnd.wap.wmlscript' => [
'wmls' ],
188 'text/xml' => [
'xml',
'xsl',
'xslt',
'rss',
'rdf' ],
189 'text/x-component' => [
'htc' ],
190 'text/x-setext' => [
'etx' ],
191 'text/x-sawfish' => [
'jl' ],
192 'video/mp4' => [
'mp4',
'm4a',
'm4p',
'm4b',
'm4r',
'm4v' ],
193 'audio/mp4' => [
'm4a' ],
194 'video/quicktime' => [
'qt',
'mov' ],
195 'video/vnd.mpegurl' => [
'mxu' ],
196 'video/x-flv' => [
'flv' ],
197 'video/x-matroska' => [
'mkv',
'mka' ],
198 'video/x-msvideo' => [
'avi' ],
199 'video/x-ogg' => [
'ogv',
'ogm',
'ogg' ],
200 'video/x-sgi-movie' => [
'movie' ],
201 'x-conference/x-cooltalk' => [
'ice' ],
202 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => [
'docx' ],
203 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => [
'dotx' ],
204 'application/vnd.ms-word.document.macroenabled.12' => [
'docm' ],
205 'application/vnd.ms-word.template.macroenabled.12' => [
'dotm' ],
206 'application/vnd.openxmlformats-officedocument.presentationml.template' => [
'potx' ],
207 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => [
'ppsx' ],
208 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => [
'pptx' ],
209 'application/vnd.ms-powerpoint.addin.macroenabled.12' => [
'ppam' ],
210 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => [
'pptm',
'potm' ],
211 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => [
'ppsm' ],
212 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => [
'xlsx' ],
213 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => [
'xltx' ],
214 'application/vnd.ms-excel.sheet.macroenabled.12' => [
'xlsm' ],
215 'application/vnd.ms-excel.template.macroenabled.12' => [
'xltm' ],
216 'application/vnd.ms-excel.addin.macroenabled.12' => [
'xlam' ],
217 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => [
'xlsb' ],
218 'model/vnd.dwfx+xps' => [
'dwfx' ],
219 'application/vnd.ms-xpsdocument' => [
'xps' ],
220 'application/x-opc+zip' => [
221 'docx',
'dotx',
'docm',
'dotm',
'potx',
'ppsx',
'pptx',
'ppam',
'pptm',
'potm',
'ppsm',
222 'xlsx',
'xltx',
'xlsm',
'xltm',
'xlam',
'xlsb',
'dwfx',
'xps' ],
223 'chemical/x-mdl-molfile' => [
'mol' ],
224 'chemical/x-mdl-sdfile' => [
'sdf' ],
225 'chemical/x-mdl-rxnfile' => [
'rxn' ],
226 'chemical/x-mdl-rdfile' => [
'rd' ],
227 'chemical/x-mdl-rgfile' => [
'rg' ],
228 'application/x-amf' => [
'amf' ],
229 'application/sla' => [
'stl' ],
230 'application/wasm' => [
'wasm' ],
234 public const MEDIA_TYPES = [
237 'application/vnd.oasis.opendocument.chart',
238 'application/vnd.oasis.opendocument.chart-template',
239 'application/vnd.oasis.opendocument.database',
240 'application/vnd.oasis.opendocument.formula',
241 'application/vnd.oasis.opendocument.formula-template',
242 'application/vnd.oasis.opendocument.graphics',
243 'application/vnd.oasis.opendocument.graphics-template',
244 'application/vnd.oasis.opendocument.image',
245 'application/vnd.oasis.opendocument.image-template',
246 'application/vnd.oasis.opendocument.presentation',
247 'application/vnd.oasis.opendocument.presentation-template',
248 'application/vnd.oasis.opendocument.spreadsheet',
249 'application/vnd.oasis.opendocument.spreadsheet-template',
250 'application/vnd.oasis.opendocument.text',
251 'application/vnd.oasis.opendocument.text-template',
252 'application/vnd.oasis.opendocument.text-master',
253 'application/vnd.oasis.opendocument.text-web',
255 'application/acrobat',
256 'application/msword',
257 'application/vnd.ms-excel',
258 'application/vnd.ms-powerpoint',
259 'application/x-director',
264 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
265 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
266 'application/vnd.ms-word.document.macroenabled.12',
267 'application/vnd.ms-word.template.macroenabled.12',
268 'application/vnd.openxmlformats-officedocument.presentationml.template',
269 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
270 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
271 'application/vnd.ms-powerpoint.addin.macroenabled.12',
272 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
273 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
274 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
275 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
276 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
277 'application/vnd.ms-excel.sheet.macroenabled.12',
278 'application/vnd.ms-excel.template.macroenabled.12',
279 'application/vnd.ms-excel.addin.macroenabled.12',
280 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
283 'application/javascript',
285 'application/x-javascript',
286 'application/javascript',
288 'application/x-javascript',
289 'application/x-ecmascript',
291 'application/x-bash',
294 'application/x-tcsh',
296 'application/x-perl',
297 'application/x-python',
301 'application/x-shockwave-flash',
311 'application/x-shockwave-flash',
312 'audio/x-pn-realaudio-plugin',
338 'audio/x-pn-realaudio',
355 'image/x-portable-pixmap',
367 'image/vnd.microsoft.icon',
369 'image/x-portable-pixmap',
370 'image/x-portable-graymap',
371 'image/x-portable-greymap',
381 'image/vnd.adobe.photoshop',
387 'application/svg+xml',
390 'application/postscript',
391 'application/x-latex',
393 'application/x-dia-diagram',
395 'application/x-acad',
396 'application/autocad_dwg',
400 'application/x-autocad',
403 'chemical/x-mdl-molfile',
404 'chemical/x-mdl-sdfile',
405 'chemical/x-mdl-rxnfile',
406 'chemical/x-mdl-rdfile',
407 'chemical/x-mdl-rgfile',
414 'application/xhtml+xml',
420 'text/tab-separated-values',
436 'application/octet-stream',
437 'application/x-empty',
442 'application/x-gzip',
443 'application/x-bzip',
444 'application/x-bzip2',
446 'application/x-stuffit',
447 'application/x-opc+zip',
448 'application/x-7z-compressed',
456 public const MIME_TYPE_ALIASES = [
457 'text/javascript' =>
'application/javascript',
458 'application/x-javascript' =>
'application/javascript',
459 'audio/mpeg' =>
'audio/mp3',
460 'audio/ogg' =>
'application/ogg',
461 'video/ogg' =>
'application/ogg',
462 'image/x-ms-bmp' =>
'image/x-bmp',
463 'image/bmp' =>
'image/x-bmp',
464 'application/octet-stream' =>
'unknown/unknown',
465 'application/x-empty' =>
'unknown/unknown',
466 'image/x-png' =>
'image/png',
467 'image/pjpeg' =>
'image/jpeg',
468 'image/x-ico' =>
'image/x-icon',
469 'image/vnd.microsoft.icon' =>
'image/x-icon',
470 'image/x-portable-greymap' =>
'image/x-portable-graymap',
471 'application/x-bmp' =>
'image/x-bmp',
472 'application/bmp' =>
'image/x-bmp',
473 'image/psd' =>
'image/x-photoshop',
474 'image/x-psd' =>
'image/x-photoshop',
475 'image/photoshop' =>
'image/x-photoshop',
476 'image/vnd.adobe.photoshop' =>
'image/x-photoshop',
477 'application/svg+xml' =>
'image/svg+xml',
478 'application/svg' =>
'image/svg+xml',
479 'image/svg' =>
'image/svg+xml',
480 'audio/mp3' =>
'audio/mpeg',
481 'audio/mpeg3' =>
'audio/mpeg',
482 'audio/x-wav' =>
'audio/wav',
483 'audio/wave' =>
'audio/wav',
484 'audio/mid' =>
'audio/midi',
485 'application/mpeg' =>
'video/mpeg',
486 'application/x-ogg' =>
'application/ogg',
487 'audio/x-ogg' =>
'application/ogg',
488 'video/x-ogg' =>
'application/ogg',
489 'application/xhtml+xml' =>
'text/html',
490 'text/xml' =>
'application/xml',
491 'application/x-zip' =>
'application/zip',
492 'application/x-ecmascript' =>
'application/javascript',
493 'text/ecmascript' =>
'application/javascript',
494 'application/acrobat' =>
'application/pdf',
495 'image/x.djvu' =>
'image/vnd.djvu',
496 'image/x-djvu' =>
'image/vnd.djvu',
497 'application/x-acad' =>
'application/acad',
498 'application/autocad_dwg' =>
'application/acad',
499 'image/x-dwg' =>
'application/acad',
500 'application/dwg' =>
'application/acad',
501 'application/x-dwg' =>
'application/acad',
502 'application/x-autocad' =>
'application/acad',
503 'image/vnd.dwg' =>
'application/acad',
504 'drawing/dwg' =>
'application/acad',
const MEDIATYPE_MULTIMEDIA
const MEDIATYPE_EXECUTABLE