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',
'jps' ],
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 'font/sfnt' => [
'ttf' ],
140 'application/font-sfnt' => [
'ttf' ],
141 'font/woff' => [
'woff' ],
142 'application/font-woff' => [
'woff' ],
143 'font/woff2' => [
'woff2' ],
144 'application/font-woff2' => [
'woff2' ],
145 'application/vnd.ms-fontobject' => [
'eot' ],
146 'application/x-font-ttf' => [
'ttf' ],
147 'audio/basic' => [
'au',
'snd' ],
148 'video/webm' => [
'webm' ],
149 'audio/webm' => [
'webm' ],
150 'audio/x-matroska' => [
'mka',
'mkv' ],
151 'audio/x-mpegurl' => [
'm3u' ],
152 'audio/x-ogg' => [
'oga',
'ogg',
'spx',
'opus' ],
153 'audio/x-pn-realaudio' => [
'ram',
'rm' ],
154 'audio/x-pn-realaudio-plugin' => [
'rpm' ],
155 'audio/x-realaudio' => [
'ra' ],
156 'audio/wav' => [
'wav' ],
157 'audio/x-flac' => [
'flac' ],
158 'audio/flac' => [
'flac' ],
159 'chemical/x-pdb' => [
'pdb' ],
160 'chemical/x-xyz' => [
'xyz' ],
161 'image/bmp' => [
'bmp' ],
162 'image/cgm' => [
'cgm' ],
163 'image/ief' => [
'ief' ],
164 'image/jp2' => [
'jp2',
'j2k',
'jpg2' ],
165 'image/jpx' => [
'jpf',
'jpx' ],
166 'image/vnd.microsoft.icon' => [
'ico' ],
167 'image/vnd.wap.wbmp' => [
'wbmp' ],
168 'image/webp' => [
'webp' ],
169 'image/x-cmu-raster' => [
'ras' ],
170 'image/x-icon' => [
'ico' ],
171 'image/x-jps' => [
'jps' ],
172 'image/x-ms-bmp' => [
'bmp' ],
173 'image/x-portable-anymap' => [
'pnm' ],
174 'image/x-portable-bitmap' => [
'pbm' ],
175 'image/x-portable-graymap' => [
'pgm' ],
176 'image/x-rgb' => [
'rgb' ],
177 'image/x-photoshop' => [
'psd' ],
178 'image/x-xbitmap' => [
'xbm' ],
179 'image/x-xpixmap' => [
'xpm' ],
180 'image/x-xwindowdump' => [
'xwd' ],
181 'model/iges' => [
'igs',
'iges' ],
182 'model/mesh' => [
'msh',
'mesh',
'silo' ],
183 'model/vrml' => [
'wrl',
'vrml' ],
184 'text/calendar' => [
'ics',
'ifb' ],
185 'text/css' => [
'css' ],
186 'text/csv' => [
'csv' ],
187 'text/richtext' => [
'rtx' ],
188 'text/rtf' => [
'rtf' ],
189 'text/sgml' => [
'sgml',
'sgm' ],
190 'text/tab-separated-values' => [
'tsv' ],
191 'text/vnd.wap.wml' => [
'wml' ],
192 'text/vnd.wap.wmlscript' => [
'wmls' ],
193 'text/xml' => [
'xml',
'xsl',
'xslt',
'rss',
'rdf' ],
194 'text/x-component' => [
'htc' ],
195 'text/x-setext' => [
'etx' ],
196 'text/x-sawfish' => [
'jl' ],
197 'video/mp4' => [
'mp4',
'm4a',
'm4p',
'm4b',
'm4r',
'm4v' ],
198 'audio/mp4' => [
'm4a' ],
199 'video/quicktime' => [
'qt',
'mov' ],
200 'video/vnd.mpegurl' => [
'mxu' ],
201 'video/x-flv' => [
'flv' ],
202 'video/x-matroska' => [
'mkv',
'mka' ],
203 'video/x-msvideo' => [
'avi' ],
204 'video/x-ogg' => [
'ogv',
'ogm',
'ogg' ],
205 'video/x-sgi-movie' => [
'movie' ],
206 'x-conference/x-cooltalk' => [
'ice' ],
207 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => [
'docx' ],
208 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => [
'dotx' ],
209 'application/vnd.ms-word.document.macroenabled.12' => [
'docm' ],
210 'application/vnd.ms-word.template.macroenabled.12' => [
'dotm' ],
211 'application/vnd.openxmlformats-officedocument.presentationml.template' => [
'potx' ],
212 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => [
'ppsx' ],
213 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => [
'pptx' ],
214 'application/vnd.ms-powerpoint.addin.macroenabled.12' => [
'ppam' ],
215 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => [
'pptm',
'potm' ],
216 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => [
'ppsm' ],
217 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => [
'xlsx' ],
218 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => [
'xltx' ],
219 'application/vnd.ms-excel.sheet.macroenabled.12' => [
'xlsm' ],
220 'application/vnd.ms-excel.template.macroenabled.12' => [
'xltm' ],
221 'application/vnd.ms-excel.addin.macroenabled.12' => [
'xlam' ],
222 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => [
'xlsb' ],
223 'model/vnd.dwfx+xps' => [
'dwfx' ],
224 'application/vnd.ms-xpsdocument' => [
'xps' ],
225 'chemical/x-mdl-molfile' => [
'mol' ],
226 'chemical/x-mdl-sdfile' => [
'sdf' ],
227 'chemical/x-mdl-rxnfile' => [
'rxn' ],
228 'chemical/x-mdl-rdfile' => [
'rd' ],
229 'chemical/x-mdl-rgfile' => [
'rg' ],
230 'application/x-amf' => [
'amf' ],
231 'application/sla' => [
'stl' ],
232 'application/wasm' => [
'wasm' ],
236 'application/x-opc+zip' => [
237 'docx',
'dotx',
'docm',
'dotm',
'potx',
'ppsx',
'pptx',
'ppam',
'pptm',
'potm',
'ppsm',
238 'xlsx',
'xltx',
'xlsm',
'xltm',
'xlam',
'xlsb',
'dwfx',
'xps'
240 'application/vnd.oasis.opendocument' => [
241 'odt',
'ott',
'odg',
'otg',
'odp',
'otp',
'ods',
'ots',
'odc',
'otc',
242 'odi',
'oti',
'odf',
'otf',
'odm',
'oth',
247 public const MEDIA_TYPES = [
250 'application/vnd.oasis.opendocument.chart',
251 'application/vnd.oasis.opendocument.chart-template',
252 'application/vnd.oasis.opendocument.database',
253 'application/vnd.oasis.opendocument.formula',
254 'application/vnd.oasis.opendocument.formula-template',
255 'application/vnd.oasis.opendocument.graphics',
256 'application/vnd.oasis.opendocument.graphics-template',
257 'application/vnd.oasis.opendocument.image',
258 'application/vnd.oasis.opendocument.image-template',
259 'application/vnd.oasis.opendocument.presentation',
260 'application/vnd.oasis.opendocument.presentation-template',
261 'application/vnd.oasis.opendocument.spreadsheet',
262 'application/vnd.oasis.opendocument.spreadsheet-template',
263 'application/vnd.oasis.opendocument.text',
264 'application/vnd.oasis.opendocument.text-template',
265 'application/vnd.oasis.opendocument.text-master',
266 'application/vnd.oasis.opendocument.text-web',
268 'application/acrobat',
269 'application/msword',
270 'application/vnd.ms-excel',
271 'application/vnd.ms-powerpoint',
272 'application/x-director',
277 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
278 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
279 'application/vnd.ms-word.document.macroenabled.12',
280 'application/vnd.ms-word.template.macroenabled.12',
281 'application/vnd.openxmlformats-officedocument.presentationml.template',
282 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
283 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
284 'application/vnd.ms-powerpoint.addin.macroenabled.12',
285 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
286 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
287 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
288 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
289 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
290 'application/vnd.ms-excel.sheet.macroenabled.12',
291 'application/vnd.ms-excel.template.macroenabled.12',
292 'application/vnd.ms-excel.addin.macroenabled.12',
293 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
296 'application/javascript',
298 'application/x-javascript',
299 'application/javascript',
301 'application/x-javascript',
302 'application/x-ecmascript',
304 'application/x-bash',
307 'application/x-tcsh',
309 'application/x-perl',
310 'application/x-python',
314 'application/x-shockwave-flash',
324 'application/x-shockwave-flash',
325 'audio/x-pn-realaudio-plugin',
351 'audio/x-pn-realaudio',
368 'image/x-portable-pixmap',
382 'image/vnd.microsoft.icon',
384 'image/x-portable-pixmap',
385 'image/x-portable-graymap',
386 'image/x-portable-greymap',
396 'image/vnd.adobe.photoshop',
402 'application/svg+xml',
405 'application/postscript',
406 'application/x-latex',
408 'application/x-dia-diagram',
410 'application/x-acad',
411 'application/autocad_dwg',
415 'application/x-autocad',
418 'chemical/x-mdl-molfile',
419 'chemical/x-mdl-sdfile',
420 'chemical/x-mdl-rxnfile',
421 'chemical/x-mdl-rdfile',
422 'chemical/x-mdl-rgfile',
429 'application/xhtml+xml',
435 'text/tab-separated-values',
451 'application/octet-stream',
452 'application/x-empty',
457 'application/x-gzip',
458 'application/x-bzip',
459 'application/x-bzip2',
461 'application/x-stuffit',
462 'application/x-opc+zip',
463 'application/x-7z-compressed',
471 public const MIME_TYPE_ALIASES = [
472 'text/javascript' =>
'application/javascript',
473 'application/x-javascript' =>
'application/javascript',
474 'audio/mpeg' =>
'audio/mp3',
475 'audio/ogg' =>
'application/ogg',
476 'video/ogg' =>
'application/ogg',
477 'image/x-ms-bmp' =>
'image/x-bmp',
478 'image/bmp' =>
'image/x-bmp',
479 'application/octet-stream' =>
'unknown/unknown',
480 'application/x-empty' =>
'unknown/unknown',
481 'image/x-png' =>
'image/png',
482 'image/pjpeg' =>
'image/jpeg',
483 'image/x-ico' =>
'image/x-icon',
484 'image/vnd.microsoft.icon' =>
'image/x-icon',
485 'image/x-portable-greymap' =>
'image/x-portable-graymap',
486 'application/x-bmp' =>
'image/x-bmp',
487 'application/bmp' =>
'image/x-bmp',
488 'image/psd' =>
'image/x-photoshop',
489 'image/x-psd' =>
'image/x-photoshop',
490 'image/photoshop' =>
'image/x-photoshop',
491 'image/vnd.adobe.photoshop' =>
'image/x-photoshop',
492 'application/svg+xml' =>
'image/svg+xml',
493 'application/svg' =>
'image/svg+xml',
494 'image/svg' =>
'image/svg+xml',
495 'audio/mp3' =>
'audio/mpeg',
496 'audio/mpeg3' =>
'audio/mpeg',
497 'audio/x-wav' =>
'audio/wav',
498 'audio/wave' =>
'audio/wav',
499 'audio/mid' =>
'audio/midi',
500 'application/mpeg' =>
'video/mpeg',
501 'application/x-ogg' =>
'application/ogg',
502 'audio/x-ogg' =>
'application/ogg',
503 'video/x-ogg' =>
'application/ogg',
504 'application/xhtml+xml' =>
'text/html',
505 'text/xml' =>
'application/xml',
506 'application/x-zip' =>
'application/zip',
507 'application/x-ecmascript' =>
'application/javascript',
508 'text/ecmascript' =>
'application/javascript',
509 'application/acrobat' =>
'application/pdf',
510 'image/x.djvu' =>
'image/vnd.djvu',
511 'image/x-djvu' =>
'image/vnd.djvu',
512 'application/x-acad' =>
'application/acad',
513 'application/autocad_dwg' =>
'application/acad',
514 'image/x-dwg' =>
'application/acad',
515 'application/dwg' =>
'application/acad',
516 'application/x-dwg' =>
'application/acad',
517 'application/x-autocad' =>
'application/acad',
518 'image/vnd.dwg' =>
'application/acad',
519 'drawing/dwg' =>
'application/acad',
520 'image/jpeg2000' =>
'image/jp2',
521 'image/jpeg2000-image' =>
'image/jp2',
522 'image/x-jpeg2000-image' =>
'image/jp2',
const MEDIATYPE_MULTIMEDIA
const MEDIATYPE_EXECUTABLE