Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions src/Symfony/Component/Mime/MimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function guessMimeType(string $path): ?string
/**
* A map of MIME types and their default extensions.
*
* Updated from upstream on 2019-01-16
* Updated from upstream on 2021-09-03
*
* @see Resources/bin/update_mime_types.php
*/
Expand Down Expand Up @@ -312,6 +312,7 @@ public function guessMimeType(string $path): ?string
'application/rss+xml' => ['rss'],
'application/rtf' => ['rtf'],
'application/sbml+xml' => ['sbml'],
'application/schema+json' => ['json'],
'application/scvp-cv-request' => ['scq'],
'application/scvp-cv-response' => ['scs'],
'application/scvp-vp-request' => ['spq'],
Expand Down Expand Up @@ -545,6 +546,7 @@ public function guessMimeType(string $path): ?string
'application/vnd.lotus-screencam' => ['scm'],
'application/vnd.lotus-wordpro' => ['lwp'],
'application/vnd.macports.portpkg' => ['portpkg'],
'application/vnd.mapbox-vector-tile' => ['mvt'],
'application/vnd.mcd' => ['mcd'],
'application/vnd.medcalcdata' => ['mc1'],
'application/vnd.mediastation.cdkey' => ['cdkey'],
Expand Down Expand Up @@ -961,7 +963,7 @@ public function guessMimeType(string $path): ?string
'application/x-kontour' => ['kon'],
'application/x-kpovmodeler' => ['kpm'],
'application/x-kpresenter' => ['kpr', 'kpt'],
'application/x-krita' => ['kra'],
'application/x-krita' => ['kra', 'krz'],
'application/x-kspread' => ['ksp'],
'application/x-kugar' => ['kud'],
'application/x-kword' => ['kwd', 'kwt'],
Expand Down Expand Up @@ -1034,7 +1036,7 @@ public function guessMimeType(string $path): ?string
'application/x-nintendo-ds-rom' => ['nds'],
'application/x-ns-proxy-autoconfig' => ['pac'],
'application/x-nzb' => ['nzb'],
'application/x-object' => ['o'],
'application/x-object' => ['o', 'mod'],
'application/x-ogg' => ['ogx'],
'application/x-oleo' => ['oleo'],
'application/x-pagemaker' => ['p65', 'pm', 'pm6', 'pmd'],
Expand Down Expand Up @@ -1370,6 +1372,7 @@ public function guessMimeType(string $path): ?string
'image/jphc' => ['jhc'],
'image/jpm' => ['jpm', 'jpgm'],
'image/jpx' => ['jpx', 'jpf'],
'image/jxl' => ['jxl'],
'image/jxr' => ['jxr'],
'image/jxra' => ['jxra'],
'image/jxrs' => ['jxrs'],
Expand Down Expand Up @@ -1430,6 +1433,7 @@ public function guessMimeType(string $path): ?string
'image/x-bmp' => ['bmp', 'dib'],
'image/x-bzeps' => ['eps.bz2', 'epsi.bz2', 'epsf.bz2'],
'image/x-canon-cr2' => ['cr2'],
'image/x-canon-cr3' => ['cr3'],
'image/x-canon-crw' => ['crw'],
'image/x-cdr' => ['cdr'],
'image/x-cmu-raster' => ['ras'],
Expand Down Expand Up @@ -1518,6 +1522,8 @@ public function guessMimeType(string $path): ?string
'model/mesh' => ['msh', 'mesh', 'silo'],
'model/mtl' => ['mtl'],
'model/obj' => ['obj'],
'model/step+zip' => ['stpz'],
'model/step-xml+zip' => ['stpxz'],
'model/stl' => ['stl'],
'model/vnd.collada+xml' => ['dae'],
'model/vnd.dwf' => ['dwf'],
Expand All @@ -1542,6 +1548,7 @@ public function guessMimeType(string $path): ?string
'text/cache-manifest' => ['appcache', 'manifest'],
'text/calendar' => ['ics', 'ifb', 'vcs'],
'text/coffeescript' => ['coffee', 'litcoffee'],
'text/crystal' => ['cr'],
'text/css' => ['css'],
'text/csv' => ['csv'],
'text/csv-schema' => ['csvs'],
Expand All @@ -1559,6 +1566,7 @@ public function guessMimeType(string $path): ?string
'text/mathml' => ['mml'],
'text/mdx' => ['mdx'],
'text/n3' => ['n3'],
'text/org' => ['org'],
'text/plain' => ['txt', 'text', 'conf', 'def', 'list', 'log', 'in', 'ini', 'asc'],
'text/prs.lines.tag' => ['dsc'],
'text/rdf' => ['rdf', 'rdfs', 'owl'],
Expand Down Expand Up @@ -1610,6 +1618,7 @@ public function guessMimeType(string $path): ?string
'text/x-comma-separated-values' => ['csv'],
'text/x-common-lisp' => ['asd', 'fasl', 'lisp', 'ros'],
'text/x-component' => ['htc'],
'text/x-crystal' => ['cr'],
'text/x-csharp' => ['cs'],
'text/x-csrc' => ['c'],
'text/x-csv' => ['csv'],
Expand All @@ -1621,6 +1630,7 @@ public function guessMimeType(string $path): ?string
'text/x-dsrc' => ['d', 'di'],
'text/x-dtd' => ['dtd'],
'text/x-eiffel' => ['e', 'eif'],
'text/x-elixir' => ['ex', 'exs'],
'text/x-emacs-lisp' => ['el'],
'text/x-erlang' => ['erl'],
'text/x-fortran' => ['f', 'for', 'f77', 'f90', 'f95'],
Expand Down Expand Up @@ -1675,14 +1685,14 @@ public function guessMimeType(string $path): ?string
'text/x-pot' => ['pot'],
'text/x-processing' => ['pde'],
'text/x-python' => ['py', 'pyx', 'wsgi'],
'text/x-python3' => ['py', 'py3', 'py3x'],
'text/x-python3' => ['py', 'py3', 'py3x', 'pyi'],
'text/x-qml' => ['qml', 'qmltypes', 'qmlproject'],
'text/x-reject' => ['rej'],
'text/x-rpm-spec' => ['spec'],
'text/x-rst' => ['rst'],
'text/x-sagemath' => ['sage'],
'text/x-sass' => ['sass'],
'text/x-scala' => ['scala'],
'text/x-scala' => ['scala', 'sc'],
'text/x-scheme' => ['scm', 'ss'],
'text/x-scss' => ['scss'],
'text/x-setext' => ['etx'],
Expand Down Expand Up @@ -2025,7 +2035,9 @@ public function guessMimeType(string $path): ?string
'cpio.gz' => ['application/x-cpio-compressed'],
'cpp' => ['text/x-c', 'text/x-c++src'],
'cpt' => ['application/mac-compactpro'],
'cr' => ['text/crystal', 'text/x-crystal'],
'cr2' => ['image/x-canon-cr2'],
'cr3' => ['image/x-canon-cr3'],
'crd' => ['application/x-mscardfile'],
'crdownload' => ['application/x-partial-download'],
'crl' => ['application/pkix-crl'],
Expand Down Expand Up @@ -2164,9 +2176,11 @@ public function guessMimeType(string $path): ?string
'etx' => ['text/x-setext'],
'eva' => ['application/x-eva'],
'evy' => ['application/x-envoy'],
'ex' => ['text/x-elixir'],
'exe' => ['application/x-ms-dos-executable', 'application/x-msdos-program', 'application/x-msdownload'],
'exi' => ['application/exi'],
'exr' => ['image/aces', 'image/x-exr'],
'exs' => ['text/x-elixir'],
'ext' => ['application/vnd.novadigm.ext'],
'ez' => ['application/andrew-inset'],
'ez2' => ['application/vnd.ezpix-album'],
Expand Down Expand Up @@ -2428,12 +2442,13 @@ public function guessMimeType(string $path): ?string
'jrd' => ['application/jrd+json'],
'js' => ['text/javascript', 'application/javascript', 'application/x-javascript'],
'jsm' => ['application/javascript', 'application/x-javascript', 'text/javascript'],
'json' => ['application/json'],
'json' => ['application/json', 'application/schema+json'],
'json-patch' => ['application/json-patch+json'],
'json5' => ['application/json5'],
'jsonld' => ['application/ld+json'],
'jsonml' => ['application/jsonml+json'],
'jsx' => ['text/jsx'],
'jxl' => ['image/jxl'],
'jxr' => ['image/jxr'],
'jxra' => ['image/jxra'],
'jxrs' => ['image/jxrs'],
Expand Down Expand Up @@ -2468,6 +2483,7 @@ public function guessMimeType(string $path): ?string
'kpt' => ['application/vnd.kde.kpresenter', 'application/x-kpresenter'],
'kpxx' => ['application/vnd.ds-keypoint'],
'kra' => ['application/x-krita'],
'krz' => ['application/x-krita'],
'ks' => ['application/x-java-keystore'],
'ksp' => ['application/vnd.kde.kspread', 'application/x-kspread'],
'ksy' => ['text/x-kaitai-struct'],
Expand Down Expand Up @@ -2611,7 +2627,7 @@ public function guessMimeType(string $path): ?string
'mo3' => ['audio/x-mo3'],
'mobi' => ['application/x-mobipocket-ebook'],
'moc' => ['text/x-moc'],
'mod' => ['audio/x-mod'],
'mod' => ['application/x-object', 'audio/x-mod'],
'mods' => ['application/mods+xml'],
'mof' => ['text/x-mof'],
'moov' => ['video/quicktime'],
Expand Down Expand Up @@ -2668,6 +2684,7 @@ public function guessMimeType(string $path): ?string
'musd' => ['application/mmt-usd+xml'],
'musicxml' => ['application/vnd.recordare.musicxml+xml'],
'mvb' => ['application/x-msmediaview'],
'mvt' => ['application/vnd.mapbox-vector-tile'],
'mwf' => ['application/vnd.mfer'],
'mxf' => ['application/mxf'],
'mxl' => ['application/vnd.recordare.musicxml'],
Expand Down Expand Up @@ -2746,7 +2763,7 @@ public function guessMimeType(string $path): ?string
'opus' => ['audio/ogg', 'audio/x-ogg', 'audio/x-opus+ogg'],
'ora' => ['image/openraster'],
'orf' => ['image/x-olympus-orf'],
'org' => ['application/vnd.lotus-organizer', 'text/x-org'],
'org' => ['application/vnd.lotus-organizer', 'text/org', 'text/x-org'],
'osf' => ['application/vnd.yamaha.openscoreformat'],
'osfpvg' => ['application/vnd.yamaha.openscoreformat.osfpvg+xml'],
'osm' => ['application/vnd.openstreetmap.data+xml'],
Expand Down Expand Up @@ -2891,6 +2908,7 @@ public function guessMimeType(string $path): ?string
'py3x' => ['text/x-python3'],
'pya' => ['audio/vnd.ms-playready.media.pya'],
'pyc' => ['application/x-python-bytecode'],
'pyi' => ['text/x-python3'],
'pyo' => ['application/x-python-bytecode'],
'pys' => ['application/x-pyspread-bz-spreadsheet'],
'pysu' => ['application/x-pyspread-spreadsheet'],
Expand Down Expand Up @@ -2993,7 +3011,7 @@ public function guessMimeType(string $path): ?string
'sass' => ['text/x-sass'],
'sav' => ['application/x-spss-sav', 'application/x-spss-savefile'],
'sbml' => ['application/sbml+xml'],
'sc' => ['application/vnd.ibm.secure-container'],
'sc' => ['application/vnd.ibm.secure-container', 'text/x-scala'],
'scala' => ['text/x-scala'],
'scd' => ['application/x-msschedule'],
'scm' => ['application/vnd.lotus-screencam', 'text/x-scheme'],
Expand Down Expand Up @@ -3121,6 +3139,8 @@ public function guessMimeType(string $path): ?string
'stk' => ['application/hyperstudio'],
'stl' => ['application/vnd.ms-pki.stl', 'model/stl', 'model/x.stl-ascii', 'model/x.stl-binary'],
'stm' => ['audio/x-stm'],
'stpxz' => ['model/step-xml+zip'],
'stpz' => ['model/step+zip'],
'str' => ['application/vnd.pg.format'],
'stw' => ['application/vnd.sun.xml.writer.template'],
'sty' => ['application/x-tex', 'text/x-tex'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

// load new map
$data = json_decode(file_get_contents('https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.47.0/db.json'), true);
$data = json_decode(file_get_contents('https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.49.0/db.json'), true);
$new = [];
foreach ($data as $mimeType => $mimeTypeInformation) {
if (!array_key_exists('extensions', $mimeTypeInformation)) {
Expand Down