| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
namespace Wikimedia\Mime; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
class MimeMap { |
| 30 |
|
| 31 |
public const MIME_EXTENSIONS = [ |
| 32 |
'application/ogg' => [ 'ogx', 'ogg', 'ogm', 'ogv', 'oga', 'spx', 'opus' ], |
| 33 |
'application/pdf' => [ 'pdf' ], |
| 34 |
'application/vnd.apple.mpegurl' => [ 'm3u8', 'm3u' ], |
| 35 |
'application/vnd.ms-opentype' => [ 'otf' ], |
| 36 |
'application/vnd.oasis.opendocument.chart' => [ 'odc' ], |
| 37 |
'application/vnd.oasis.opendocument.chart-template' => [ 'otc' ], |
| 38 |
'application/vnd.oasis.opendocument.database' => [ 'odb' ], |
| 39 |
'application/vnd.oasis.opendocument.formula' => [ 'odf' ], |
| 40 |
'application/vnd.oasis.opendocument.formula-template' => [ 'otf' ], |
| 41 |
'application/vnd.oasis.opendocument.graphics' => [ 'odg' ], |
| 42 |
'application/vnd.oasis.opendocument.graphics-template' => [ 'otg' ], |
| 43 |
'application/vnd.oasis.opendocument.image' => [ 'odi' ], |
| 44 |
'application/vnd.oasis.opendocument.image-template' => [ 'oti' ], |
| 45 |
'application/vnd.oasis.opendocument.presentation' => [ 'odp' ], |
| 46 |
'application/vnd.oasis.opendocument.presentation-template' => [ 'otp' ], |
| 47 |
'application/vnd.oasis.opendocument.spreadsheet' => [ 'ods' ], |
| 48 |
'application/vnd.oasis.opendocument.spreadsheet-template' => [ 'ots' ], |
| 49 |
'application/vnd.oasis.opendocument.text' => [ 'odt' ], |
| 50 |
'application/vnd.oasis.opendocument.text-master' => [ 'otm', 'odm' ], |
| 51 |
'application/vnd.oasis.opendocument.text-template' => [ 'ott' ], |
| 52 |
'application/vnd.oasis.opendocument.text-web' => [ 'oth' ], |
| 53 |
'application/javascript' => [ 'js' ], |
| 54 |
'application/x-mpegurl' => [ 'm3u', 'm3u8' ], |
| 55 |
'application/x-shockwave-flash' => [ 'swf' ], |
| 56 |
'audio/midi' => [ 'mid', 'midi', 'kar' ], |
| 57 |
'audio/mpeg' => [ 'mpga', 'mpa', 'mp2', 'mp3' ], |
| 58 |
'audio/x-aiff' => [ 'aif', 'aiff', 'aifc' ], |
| 59 |
'audio/x-wav' => [ 'wav' ], |
| 60 |
'audio/ogg' => [ 'oga', 'spx', 'ogg', 'opus' ], |
| 61 |
'audio/opus' => [ 'opus', 'ogg', 'oga', 'spx' ], |
| 62 |
'image/x-bmp' => [ 'bmp' ], |
| 63 |
'image/gif' => [ 'gif' ], |
| 64 |
'image/jpeg' => [ 'jpeg', 'jpg', 'jpe', 'jps' ], |
| 65 |
'image/png' => [ 'png', 'apng' ], |
| 66 |
'image/svg+xml' => [ 'svg' ], |
| 67 |
'image/svg' => [ 'svg' ], |
| 68 |
'image/tiff' => [ 'tiff', 'tif' ], |
| 69 |
'image/vnd.djvu' => [ 'djvu', 'djv' ], |
| 70 |
'image/x.djvu' => [ 'djvu' ], |
| 71 |
'image/x-djvu' => [ 'djvu' ], |
| 72 |
'image/x-portable-pixmap' => [ 'ppm' ], |
| 73 |
'image/x-xcf' => [ 'xcf' ], |
| 74 |
'text/plain' => [ 'txt' ], |
| 75 |
'text/html' => [ 'html', 'htm' ], |
| 76 |
'video/ogg' => [ 'ogv', 'ogm', 'ogg' ], |
| 77 |
'video/mpeg' => [ 'mpg', 'mpeg', 'mpe' ], |
| 78 |
'application/acad' => [ 'dwg' ], |
| 79 |
'application/andrew-inset' => [ 'ez' ], |
| 80 |
'application/mac-binhex40' => [ 'hqx' ], |
| 81 |
'application/mac-compactpro' => [ 'cpt' ], |
| 82 |
'application/mathml+xml' => [ 'mathml' ], |
| 83 |
'application/msword' => [ 'doc', 'dot' ], |
| 84 |
'application/octet-stream' => [ 'bin', 'dms', 'lha', 'lzh', 'exe', 'class', 'so', 'dll' ], |
| 85 |
'application/oda' => [ 'oda' ], |
| 86 |
'application/postscript' => [ 'ai', 'eps', 'ps' ], |
| 87 |
'application/rdf+xml' => [ 'rdf', 'owl' ], |
| 88 |
'application/smil' => [ 'smi', 'smil' ], |
| 89 |
'application/srgs' => [ 'gram' ], |
| 90 |
'application/srgs+xml' => [ 'grxml' ], |
| 91 |
'application/vnd.mif' => [ 'mif' ], |
| 92 |
'application/vnd.ms-excel' => [ 'xls', 'xlt', 'xla' ], |
| 93 |
'application/vnd.ms-powerpoint' => [ 'ppt', 'pot', 'pps', 'ppa' ], |
| 94 |
'application/vnd.wap.wbxml' => [ 'wbxml' ], |
| 95 |
'application/vnd.wap.wmlc' => [ 'wmlc' ], |
| 96 |
'application/vnd.wap.wmlscriptc' => [ 'wmlsc' ], |
| 97 |
'application/voicexml+xml' => [ 'vxml' ], |
| 98 |
'application/x-7z-compressed' => [ '7z' ], |
| 99 |
'application/x-bcpio' => [ 'bcpio' ], |
| 100 |
'application/x-bzip' => [ 'bz' ], |
| 101 |
'application/x-bzip2' => [ 'bz2' ], |
| 102 |
'application/x-cdlink' => [ 'vcd' ], |
| 103 |
'application/x-chess-pgn' => [ 'pgn' ], |
| 104 |
'application/x-cpio' => [ 'cpio' ], |
| 105 |
'application/x-csh' => [ 'csh' ], |
| 106 |
'application/x-dia-diagram' => [ 'dia' ], |
| 107 |
'application/x-director' => [ 'dcr', 'dir', 'dxr' ], |
| 108 |
'application/x-dvi' => [ 'dvi' ], |
| 109 |
'application/x-futuresplash' => [ 'spl' ], |
| 110 |
'application/x-gtar' => [ 'gtar', 'tar' ], |
| 111 |
'application/x-gzip' => [ 'gz' ], |
| 112 |
'application/x-hdf' => [ 'hdf' ], |
| 113 |
'application/x-jar' => [ 'jar' ], |
| 114 |
'application/json' => [ 'json' ], |
| 115 |
'application/x-koan' => [ 'skp', 'skd', 'skt', 'skm' ], |
| 116 |
'application/x-latex' => [ 'latex' ], |
| 117 |
'application/x-netcdf' => [ 'nc', 'cdf' ], |
| 118 |
'application/x-sh' => [ 'sh' ], |
| 119 |
'application/x-shar' => [ 'shar' ], |
| 120 |
'application/x-stuffit' => [ 'sit' ], |
| 121 |
'application/x-sv4cpio' => [ 'sv4cpio' ], |
| 122 |
'application/x-sv4crc' => [ 'sv4crc' ], |
| 123 |
'application/x-tar' => [ 'tar' ], |
| 124 |
'application/x-tcl' => [ 'tcl' ], |
| 125 |
'application/x-tex' => [ 'tex' ], |
| 126 |
'application/x-texinfo' => [ 'texinfo', 'texi' ], |
| 127 |
'application/x-troff' => [ 't', 'tr', 'roff' ], |
| 128 |
'application/x-troff-man' => [ 'man' ], |
| 129 |
'application/x-troff-me' => [ 'me' ], |
| 130 |
'application/x-troff-ms' => [ 'ms' ], |
| 131 |
'application/x-ustar' => [ 'ustar' ], |
| 132 |
'application/x-wais-source' => [ 'src' ], |
| 133 |
'application/x-xpinstall' => [ 'xpi' ], |
| 134 |
'application/xhtml+xml' => [ 'xhtml', 'xht' ], |
| 135 |
'application/xslt+xml' => [ 'xslt' ], |
| 136 |
'application/xml' => [ 'xml', 'xsl', 'xsd', 'kml' ], |
| 137 |
'application/xml-dtd' => [ 'dtd' ], |
| 138 |
'application/zip' => |
| 139 |
[ 'zip', 'jar', 'xpi', 'sxc', 'stc', 'sxd', 'std', 'sxi', 'sti', 'sxm', 'stm', 'sxw', 'stw' ], |
| 140 |
'application/x-rar' => [ 'rar' ], |
| 141 |
'font/collection' => [ 'ttc' ], |
| 142 |
'font/otf' => [ 'ttf', 'otf' ], |
| 143 |
'font/sfnt' => [ 'ttf', 'otf' ], |
| 144 |
'font/ttf' => [ 'ttf', 'otf' ], |
| 145 |
'application/font-sfnt' => [ 'ttf' ], |
| 146 |
'font/woff' => [ 'woff' ], |
| 147 |
'application/font-woff' => [ 'woff' ], |
| 148 |
'font/woff2' => [ 'woff2' ], |
| 149 |
'application/font-woff2' => [ 'woff2' ], |
| 150 |
'application/vnd.ms-fontobject' => [ 'eot' ], |
| 151 |
'application/x-font-ttf' => [ 'ttf' ], |
| 152 |
'audio/basic' => [ 'au', 'snd' ], |
| 153 |
'video/webm' => [ 'webm' ], |
| 154 |
'audio/webm' => [ 'webm' ], |
| 155 |
'audio/matroska' => [ 'mka', 'mkv' ], |
| 156 |
'audio/x-mpegurl' => [ 'm3u' ], |
| 157 |
'audio/x-ogg' => [ 'oga', 'ogg', 'spx', 'opus' ], |
| 158 |
'audio/x-pn-realaudio' => [ 'ram', 'rm' ], |
| 159 |
'audio/x-pn-realaudio-plugin' => [ 'rpm' ], |
| 160 |
'audio/x-realaudio' => [ 'ra' ], |
| 161 |
'audio/wav' => [ 'wav' ], |
| 162 |
'audio/x-flac' => [ 'flac' ], |
| 163 |
'audio/flac' => [ 'flac' ], |
| 164 |
'chemical/x-pdb' => [ 'pdb' ], |
| 165 |
'chemical/x-xyz' => [ 'xyz' ], |
| 166 |
'image/bmp' => [ 'bmp' ], |
| 167 |
'image/cgm' => [ 'cgm' ], |
| 168 |
'image/ief' => [ 'ief' ], |
| 169 |
'image/jp2' => [ 'jp2', 'j2k', 'jpg2' ], |
| 170 |
'image/jpx' => [ 'jpf', 'jpx' ], |
| 171 |
'image/vnd.microsoft.icon' => [ 'ico' ], |
| 172 |
'image/vnd.wap.wbmp' => [ 'wbmp' ], |
| 173 |
'image/webp' => [ 'webp' ], |
| 174 |
'image/x-cmu-raster' => [ 'ras' ], |
| 175 |
'image/x-icon' => [ 'ico' ], |
| 176 |
'image/x-jps' => [ 'jps' ], |
| 177 |
'image/x-ms-bmp' => [ 'bmp' ], |
| 178 |
'image/x-portable-anymap' => [ 'pnm' ], |
| 179 |
'image/x-portable-bitmap' => [ 'pbm' ], |
| 180 |
'image/x-portable-graymap' => [ 'pgm' ], |
| 181 |
'image/x-rgb' => [ 'rgb' ], |
| 182 |
'image/x-photoshop' => [ 'psd' ], |
| 183 |
'image/x-xbitmap' => [ 'xbm' ], |
| 184 |
'image/x-xpixmap' => [ 'xpm' ], |
| 185 |
'image/x-xwindowdump' => [ 'xwd' ], |
| 186 |
'model/iges' => [ 'igs', 'iges' ], |
| 187 |
'model/mesh' => [ 'msh', 'mesh', 'silo' ], |
| 188 |
'model/vrml' => [ 'wrl', 'vrml' ], |
| 189 |
'text/calendar' => [ 'ics', 'ifb' ], |
| 190 |
'text/css' => [ 'css' ], |
| 191 |
'text/csv' => [ 'csv' ], |
| 192 |
'text/richtext' => [ 'rtx' ], |
| 193 |
'text/rtf' => [ 'rtf' ], |
| 194 |
'text/sgml' => [ 'sgml', 'sgm' ], |
| 195 |
'text/tab-separated-values' => [ 'tsv' ], |
| 196 |
'text/vnd.wap.wml' => [ 'wml' ], |
| 197 |
'text/vnd.wap.wmlscript' => [ 'wmls' ], |
| 198 |
'text/xml' => [ 'xml', 'xsl', 'xslt', 'rss', 'rdf' ], |
| 199 |
'text/x-component' => [ 'htc' ], |
| 200 |
'text/x-less' => [ 'less' ], |
| 201 |
'text/x-setext' => [ 'etx' ], |
| 202 |
'text/x-sawfish' => [ 'jl' ], |
| 203 |
'video/mp4' => [ 'mp4', 'm4a', 'm4p', 'm4b', 'm4r', 'm4v' ], |
| 204 |
'audio/mp4' => [ 'm4a' ], |
| 205 |
'video/quicktime' => [ 'qt', 'mov' ], |
| 206 |
'video/vnd.mpegurl' => [ 'mxu' ], |
| 207 |
'video/x-flv' => [ 'flv' ], |
| 208 |
'video/matroska' => [ 'mkv', 'mka' ], |
| 209 |
'video/x-msvideo' => [ 'avi' ], |
| 210 |
'video/x-ogg' => [ 'ogv', 'ogm', 'ogg' ], |
| 211 |
'video/x-sgi-movie' => [ 'movie' ], |
| 212 |
'x-conference/x-cooltalk' => [ 'ice' ], |
| 213 |
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => [ 'docx' ], |
| 214 |
'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => [ 'dotx' ], |
| 215 |
'application/vnd.ms-word.document.macroenabled.12' => [ 'docm' ], |
| 216 |
'application/vnd.ms-word.template.macroenabled.12' => [ 'dotm' ], |
| 217 |
'application/vnd.openxmlformats-officedocument.presentationml.template' => [ 'potx' ], |
| 218 |
'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => [ 'ppsx' ], |
| 219 |
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => [ 'pptx' ], |
| 220 |
'application/vnd.ms-powerpoint.addin.macroenabled.12' => [ 'ppam' ], |
| 221 |
'application/vnd.ms-powerpoint.presentation.macroenabled.12' => [ 'pptm', 'potm' ], |
| 222 |
'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => [ 'ppsm' ], |
| 223 |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => [ 'xlsx' ], |
| 224 |
'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => [ 'xltx' ], |
| 225 |
'application/vnd.ms-excel.sheet.macroenabled.12' => [ 'xlsm' ], |
| 226 |
'application/vnd.ms-excel.template.macroenabled.12' => [ 'xltm' ], |
| 227 |
'application/vnd.ms-excel.addin.macroenabled.12' => [ 'xlam' ], |
| 228 |
'application/vnd.ms-excel.sheet.binary.macroenabled.12' => [ 'xlsb' ], |
| 229 |
'model/gltf-binary' => [ 'glb' ], |
| 230 |
'model/gltf+json' => [ 'gltf' ], |
| 231 |
'model/vnd.dwfx+xps' => [ 'dwfx' ], |
| 232 |
'application/vnd.ms-xpsdocument' => [ 'xps' ], |
| 233 |
'chemical/x-mdl-molfile' => [ 'mol' ], |
| 234 |
'chemical/x-mdl-sdfile' => [ 'sdf' ], |
| 235 |
'chemical/x-mdl-rxnfile' => [ 'rxn' ], |
| 236 |
'chemical/x-mdl-rdfile' => [ 'rd' ], |
| 237 |
'chemical/x-mdl-rgfile' => [ 'rg' ], |
| 238 |
'application/x-amf' => [ 'amf' ], |
| 239 |
'application/sla' => [ 'stl' ], |
| 240 |
'application/wasm' => [ 'wasm' ], |
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
'application/x-opc+zip' => [ |
| 245 |
'docx', 'dotx', 'docm', 'dotm', 'potx', 'ppsx', 'pptx', 'ppam', 'pptm', 'potm', 'ppsm', |
| 246 |
'xlsx', 'xltx', 'xlsm', 'xltm', 'xlam', 'xlsb', 'dwfx', 'xps' |
| 247 |
], |
| 248 |
'application/vnd.oasis.opendocument' => [ |
| 249 |
'odt', 'ott', 'odg', 'otg', 'odp', 'otp', 'ods', 'ots', 'odc', 'otc', |
| 250 |
'odi', 'oti', 'odf', 'otf', 'odm', 'oth', |
| 251 |
] |
| 252 |
]; |
| 253 |
|
| 254 |
|
| 255 |
public const MEDIA_TYPES = [ |
| 256 |
MEDIATYPE_OFFICE => [ |
| 257 |
'application/pdf', |
| 258 |
'application/vnd.oasis.opendocument.chart', |
| 259 |
'application/vnd.oasis.opendocument.chart-template', |
| 260 |
'application/vnd.oasis.opendocument.database', |
| 261 |
'application/vnd.oasis.opendocument.formula', |
| 262 |
'application/vnd.oasis.opendocument.formula-template', |
| 263 |
'application/vnd.oasis.opendocument.graphics', |
| 264 |
'application/vnd.oasis.opendocument.graphics-template', |
| 265 |
'application/vnd.oasis.opendocument.image', |
| 266 |
'application/vnd.oasis.opendocument.image-template', |
| 267 |
'application/vnd.oasis.opendocument.presentation', |
| 268 |
'application/vnd.oasis.opendocument.presentation-template', |
| 269 |
'application/vnd.oasis.opendocument.spreadsheet', |
| 270 |
'application/vnd.oasis.opendocument.spreadsheet-template', |
| 271 |
'application/vnd.oasis.opendocument.text', |
| 272 |
'application/vnd.oasis.opendocument.text-template', |
| 273 |
'application/vnd.oasis.opendocument.text-master', |
| 274 |
'application/vnd.oasis.opendocument.text-web', |
| 275 |
'application/pdf', |
| 276 |
'application/acrobat', |
| 277 |
'application/msword', |
| 278 |
'application/vnd.ms-excel', |
| 279 |
'application/vnd.ms-powerpoint', |
| 280 |
'application/x-director', |
| 281 |
'image/vnd.djvu', |
| 282 |
'image/x.djvu', |
| 283 |
'image/x-djvu', |
| 284 |
'text/rtf', |
| 285 |
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
| 286 |
'application/vnd.openxmlformats-officedocument.wordprocessingml.template', |
| 287 |
'application/vnd.ms-word.document.macroenabled.12', |
| 288 |
'application/vnd.ms-word.template.macroenabled.12', |
| 289 |
'application/vnd.openxmlformats-officedocument.presentationml.template', |
| 290 |
'application/vnd.openxmlformats-officedocument.presentationml.slideshow', |
| 291 |
'application/vnd.openxmlformats-officedocument.presentationml.presentation', |
| 292 |
'application/vnd.ms-powerpoint.addin.macroenabled.12', |
| 293 |
'application/vnd.ms-powerpoint.presentation.macroenabled.12', |
| 294 |
'application/vnd.ms-powerpoint.presentation.macroenabled.12', |
| 295 |
'application/vnd.ms-powerpoint.slideshow.macroenabled.12', |
| 296 |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
| 297 |
'application/vnd.openxmlformats-officedocument.spreadsheetml.template', |
| 298 |
'application/vnd.ms-excel.sheet.macroenabled.12', |
| 299 |
'application/vnd.ms-excel.template.macroenabled.12', |
| 300 |
'application/vnd.ms-excel.addin.macroenabled.12', |
| 301 |
'application/vnd.ms-excel.sheet.binary.macroenabled.12', |
| 302 |
], |
| 303 |
MEDIATYPE_EXECUTABLE => [ |
| 304 |
'application/javascript', |
| 305 |
'text/javascript', |
| 306 |
'application/x-javascript', |
| 307 |
'application/javascript', |
| 308 |
'text/javascript', |
| 309 |
'application/x-javascript', |
| 310 |
'application/x-ecmascript', |
| 311 |
'text/ecmascript', |
| 312 |
'application/x-bash', |
| 313 |
'application/x-sh', |
| 314 |
'application/x-csh', |
| 315 |
'application/x-tcsh', |
| 316 |
'application/x-tcl', |
| 317 |
'application/x-perl', |
| 318 |
'application/x-python', |
| 319 |
'application/wasm', |
| 320 |
], |
| 321 |
MEDIATYPE_MULTIMEDIA => [ |
| 322 |
'application/x-shockwave-flash', |
| 323 |
'application/ogg', |
| 324 |
'application/vnd.apple.mpegurl', |
| 325 |
'application/x-mpegurl', |
| 326 |
'audio/ogg', |
| 327 |
'video/ogg', |
| 328 |
'application/ogg', |
| 329 |
'application/x-ogg', |
| 330 |
'audio/ogg', |
| 331 |
'audio/x-ogg', |
| 332 |
'video/ogg', |
| 333 |
'video/x-ogg', |
| 334 |
'application/x-shockwave-flash', |
| 335 |
'audio/x-pn-realaudio-plugin', |
| 336 |
'model/iges', |
| 337 |
'model/mesh', |
| 338 |
'model/vrml', |
| 339 |
'video/quicktime', |
| 340 |
'video/x-msvideo', |
| 341 |
], |
| 342 |
MEDIATYPE_AUDIO => [ |
| 343 |
'audio/midi', |
| 344 |
'audio/x-aiff', |
| 345 |
'audio/x-wav', |
| 346 |
'audio/mp3', |
| 347 |
'audio/mpeg', |
| 348 |
'audio/mpeg', |
| 349 |
'audio/mp3', |
| 350 |
'audio/mpeg3', |
| 351 |
'audio/mp4', |
| 352 |
'audio/wav', |
| 353 |
'audio/x-wav', |
| 354 |
'audio/wave', |
| 355 |
'audio/midi', |
| 356 |
'audio/mid', |
| 357 |
'audio/basic', |
| 358 |
'audio/ogg', |
| 359 |
'audio/opus', |
| 360 |
'audio/x-aiff', |
| 361 |
'audio/x-pn-realaudio', |
| 362 |
'audio/x-realaudio', |
| 363 |
'audio/webm', |
| 364 |
'audio/matroska', |
| 365 |
'audio/x-flac', |
| 366 |
'audio/flac', |
| 367 |
], |
| 368 |
MEDIATYPE_BITMAP => [ |
| 369 |
'image/x-bmp', |
| 370 |
'image/x-ms-bmp', |
| 371 |
'image/bmp', |
| 372 |
'image/gif', |
| 373 |
'image/jpeg', |
| 374 |
'image/png', |
| 375 |
'image/tiff', |
| 376 |
'image/vnd.djvu', |
| 377 |
'image/x-xcf', |
| 378 |
'image/x-portable-pixmap', |
| 379 |
'image/gif', |
| 380 |
'image/png', |
| 381 |
'image/x-png', |
| 382 |
'image/ief', |
| 383 |
'image/jpeg', |
| 384 |
'image/x-jps', |
| 385 |
'image/pjpeg', |
| 386 |
'image/jp2', |
| 387 |
'image/jpx', |
| 388 |
'image/xbm', |
| 389 |
'image/tiff', |
| 390 |
'image/x-icon', |
| 391 |
'image/x-ico', |
| 392 |
'image/vnd.microsoft.icon', |
| 393 |
'image/x-rgb', |
| 394 |
'image/x-portable-pixmap', |
| 395 |
'image/x-portable-graymap', |
| 396 |
'image/x-portable-greymap', |
| 397 |
'image/x-bmp', |
| 398 |
'image/x-ms-bmp', |
| 399 |
'image/bmp', |
| 400 |
'application/x-bmp', |
| 401 |
'application/bmp', |
| 402 |
'image/x-photoshop', |
| 403 |
'image/psd', |
| 404 |
'image/x-psd', |
| 405 |
'image/photoshop', |
| 406 |
'image/vnd.adobe.photoshop', |
| 407 |
'image/webp', |
| 408 |
], |
| 409 |
MEDIATYPE_DRAWING => [ |
| 410 |
'image/svg+xml', |
| 411 |
'image/svg+xml', |
| 412 |
'application/svg+xml', |
| 413 |
'application/svg', |
| 414 |
'image/svg', |
| 415 |
'application/postscript', |
| 416 |
'application/x-latex', |
| 417 |
'application/x-tex', |
| 418 |
'application/x-dia-diagram', |
| 419 |
'application/acad', |
| 420 |
'application/x-acad', |
| 421 |
'application/autocad_dwg', |
| 422 |
'image/x-dwg', |
| 423 |
'application/dwg', |
| 424 |
'application/x-dwg', |
| 425 |
'application/x-autocad', |
| 426 |
'image/vnd.dwg', |
| 427 |
'drawing/dwg', |
| 428 |
'chemical/x-mdl-molfile', |
| 429 |
'chemical/x-mdl-sdfile', |
| 430 |
'chemical/x-mdl-rxnfile', |
| 431 |
'chemical/x-mdl-rdfile', |
| 432 |
'chemical/x-mdl-rgfile', |
| 433 |
], |
| 434 |
MEDIATYPE_TEXT => [ |
| 435 |
'text/plain', |
| 436 |
'text/html', |
| 437 |
'text/plain', |
| 438 |
'text/html', |
| 439 |
'application/xhtml+xml', |
| 440 |
'application/xml', |
| 441 |
'text/xml', |
| 442 |
'text', |
| 443 |
'application/json', |
| 444 |
'text/csv', |
| 445 |
'text/tab-separated-values', |
| 446 |
], |
| 447 |
MEDIATYPE_VIDEO => [ |
| 448 |
'video/ogg', |
| 449 |
'video/mpeg', |
| 450 |
'video/mpeg', |
| 451 |
'application/mpeg', |
| 452 |
'video/ogg', |
| 453 |
'video/x-sgi-video', |
| 454 |
'video/x-flv', |
| 455 |
'video/webm', |
| 456 |
'video/matroska', |
| 457 |
'video/mp4', |
| 458 |
], |
| 459 |
MEDIATYPE_UNKNOWN => [ |
| 460 |
'unknown/unknown', |
| 461 |
'application/octet-stream', |
| 462 |
'application/x-empty', |
| 463 |
], |
| 464 |
MEDIATYPE_ARCHIVE => [ |
| 465 |
'application/zip', |
| 466 |
'application/x-zip', |
| 467 |
'application/x-gzip', |
| 468 |
'application/x-bzip', |
| 469 |
'application/x-bzip2', |
| 470 |
'application/x-tar', |
| 471 |
'application/x-stuffit', |
| 472 |
'application/x-opc+zip', |
| 473 |
'application/x-7z-compressed', |
| 474 |
], |
| 475 |
MEDIATYPE_3D => [ |
| 476 |
'application/sla', |
| 477 |
'model/gltf-binary', |
| 478 |
'model/gltf+json', |
| 479 |
], |
| 480 |
]; |
| 481 |
|
| 482 |
|
| 483 |
public const MIME_TYPE_ALIASES = [ |
| 484 |
'text/javascript' => 'application/javascript', |
| 485 |
'application/x-javascript' => 'application/javascript', |
| 486 |
'audio/mpeg' => 'audio/mp3', |
| 487 |
'audio/ogg' => 'application/ogg', |
| 488 |
'video/ogg' => 'application/ogg', |
| 489 |
'image/x-ms-bmp' => 'image/x-bmp', |
| 490 |
'image/bmp' => 'image/x-bmp', |
| 491 |
'application/octet-stream' => 'unknown/unknown', |
| 492 |
'application/x-empty' => 'unknown/unknown', |
| 493 |
'image/x-png' => 'image/png', |
| 494 |
'image/pjpeg' => 'image/jpeg', |
| 495 |
'image/x-ico' => 'image/x-icon', |
| 496 |
'image/vnd.microsoft.icon' => 'image/x-icon', |
| 497 |
'image/x-portable-greymap' => 'image/x-portable-graymap', |
| 498 |
'application/x-bmp' => 'image/x-bmp', |
| 499 |
'application/bmp' => 'image/x-bmp', |
| 500 |
'image/psd' => 'image/x-photoshop', |
| 501 |
'image/x-psd' => 'image/x-photoshop', |
| 502 |
'image/photoshop' => 'image/x-photoshop', |
| 503 |
'image/vnd.adobe.photoshop' => 'image/x-photoshop', |
| 504 |
'application/svg+xml' => 'image/svg+xml', |
| 505 |
'application/svg' => 'image/svg+xml', |
| 506 |
'image/svg' => 'image/svg+xml', |
| 507 |
'audio/mp3' => 'audio/mpeg', |
| 508 |
'audio/mpeg3' => 'audio/mpeg', |
| 509 |
'audio/x-wav' => 'audio/wav', |
| 510 |
'audio/wave' => 'audio/wav', |
| 511 |
'audio/mid' => 'audio/midi', |
| 512 |
'application/mpeg' => 'video/mpeg', |
| 513 |
'application/x-ogg' => 'application/ogg', |
| 514 |
'audio/x-ogg' => 'application/ogg', |
| 515 |
'video/x-ogg' => 'application/ogg', |
| 516 |
'application/xhtml+xml' => 'text/html', |
| 517 |
'text/xml' => 'application/xml', |
| 518 |
'application/x-zip' => 'application/zip', |
| 519 |
'application/x-ecmascript' => 'application/javascript', |
| 520 |
'text/ecmascript' => 'application/javascript', |
| 521 |
'application/acrobat' => 'application/pdf', |
| 522 |
'image/x.djvu' => 'image/vnd.djvu', |
| 523 |
'image/x-djvu' => 'image/vnd.djvu', |
| 524 |
'application/x-acad' => 'application/acad', |
| 525 |
'application/autocad_dwg' => 'application/acad', |
| 526 |
'image/x-dwg' => 'application/acad', |
| 527 |
'application/dwg' => 'application/acad', |
| 528 |
'application/x-dwg' => 'application/acad', |
| 529 |
'application/x-autocad' => 'application/acad', |
| 530 |
'image/vnd.dwg' => 'application/acad', |
| 531 |
'drawing/dwg' => 'application/acad', |
| 532 |
'image/jpeg2000' => 'image/jp2', |
| 533 |
'image/jpeg2000-image' => 'image/jp2', |
| 534 |
'image/x-jpeg2000-image' => 'image/jp2', |
| 535 |
'application/csv' => 'text/csv', |
| 536 |
'application/x-csv' => 'text/csv', |
| 537 |
'text/x-csv' => 'text/csv', |
| 538 |
'text/comma-separated-values' => 'text/csv', |
| 539 |
'text/x-comma-separated-values' => 'text/csv', |
| 540 |
'video/x-matroska' => 'video/matroska', |
| 541 |
'audio/x-matroska' => 'audio/matroska', |
| 542 |
]; |
| 543 |
} |