Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb1199a

Browse files
committed
[Mime] Update mime types
1 parent 073501a commit bb1199a

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

src/Symfony/Component/Mime/MimeTypes.php

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function guessMimeType(string $path): ?string
146146
/**
147147
* A map of MIME types and their default extensions.
148148
*
149-
* Updated from upstream on 2019-01-16
149+
* Updated from upstream on 2021-09-03
150150
*
151151
* @see Resources/bin/update_mime_types.php
152152
*/
@@ -312,6 +312,7 @@ public function guessMimeType(string $path): ?string
312312
'application/rss+xml' => ['rss'],
313313
'application/rtf' => ['rtf'],
314314
'application/sbml+xml' => ['sbml'],
315+
'application/schema+json' => ['json'],
315316
'application/scvp-cv-request' => ['scq'],
316317
'application/scvp-cv-response' => ['scs'],
317318
'application/scvp-vp-request' => ['spq'],
@@ -545,6 +546,7 @@ public function guessMimeType(string $path): ?string
545546
'application/vnd.lotus-screencam' => ['scm'],
546547
'application/vnd.lotus-wordpro' => ['lwp'],
547548
'application/vnd.macports.portpkg' => ['portpkg'],
549+
'application/vnd.mapbox-vector-tile' => ['mvt'],
548550
'application/vnd.mcd' => ['mcd'],
549551
'application/vnd.medcalcdata' => ['mc1'],
550552
'application/vnd.mediastation.cdkey' => ['cdkey'],
@@ -961,7 +963,7 @@ public function guessMimeType(string $path): ?string
961963
'application/x-kontour' => ['kon'],
962964
'application/x-kpovmodeler' => ['kpm'],
963965
'application/x-kpresenter' => ['kpr', 'kpt'],
964-
'application/x-krita' => ['kra'],
966+
'application/x-krita' => ['kra', 'krz'],
965967
'application/x-kspread' => ['ksp'],
966968
'application/x-kugar' => ['kud'],
967969
'application/x-kword' => ['kwd', 'kwt'],
@@ -1034,7 +1036,7 @@ public function guessMimeType(string $path): ?string
10341036
'application/x-nintendo-ds-rom' => ['nds'],
10351037
'application/x-ns-proxy-autoconfig' => ['pac'],
10361038
'application/x-nzb' => ['nzb'],
1037-
'application/x-object' => ['o'],
1039+
'application/x-object' => ['o', 'mod'],
10381040
'application/x-ogg' => ['ogx'],
10391041
'application/x-oleo' => ['oleo'],
10401042
'application/x-pagemaker' => ['p65', 'pm', 'pm6', 'pmd'],
@@ -1370,6 +1372,7 @@ public function guessMimeType(string $path): ?string
13701372
'image/jphc' => ['jhc'],
13711373
'image/jpm' => ['jpm', 'jpgm'],
13721374
'image/jpx' => ['jpx', 'jpf'],
1375+
'image/jxl' => ['jxl'],
13731376
'image/jxr' => ['jxr'],
13741377
'image/jxra' => ['jxra'],
13751378
'image/jxrs' => ['jxrs'],
@@ -1430,6 +1433,7 @@ public function guessMimeType(string $path): ?string
14301433
'image/x-bmp' => ['bmp', 'dib'],
14311434
'image/x-bzeps' => ['eps.bz2', 'epsi.bz2', 'epsf.bz2'],
14321435
'image/x-canon-cr2' => ['cr2'],
1436+
'image/x-canon-cr3' => ['cr3'],
14331437
'image/x-canon-crw' => ['crw'],
14341438
'image/x-cdr' => ['cdr'],
14351439
'image/x-cmu-raster' => ['ras'],
@@ -1518,6 +1522,8 @@ public function guessMimeType(string $path): ?string
15181522
'model/mesh' => ['msh', 'mesh', 'silo'],
15191523
'model/mtl' => ['mtl'],
15201524
'model/obj' => ['obj'],
1525+
'model/step+zip' => ['stpz'],
1526+
'model/step-xml+zip' => ['stpxz'],
15211527
'model/stl' => ['stl'],
15221528
'model/vnd.collada+xml' => ['dae'],
15231529
'model/vnd.dwf' => ['dwf'],
@@ -1542,6 +1548,7 @@ public function guessMimeType(string $path): ?string
15421548
'text/cache-manifest' => ['appcache', 'manifest'],
15431549
'text/calendar' => ['ics', 'ifb', 'vcs'],
15441550
'text/coffeescript' => ['coffee', 'litcoffee'],
1551+
'text/crystal' => ['cr'],
15451552
'text/css' => ['css'],
15461553
'text/csv' => ['csv'],
15471554
'text/csv-schema' => ['csvs'],
@@ -1559,6 +1566,7 @@ public function guessMimeType(string $path): ?string
15591566
'text/mathml' => ['mml'],
15601567
'text/mdx' => ['mdx'],
15611568
'text/n3' => ['n3'],
1569+
'text/org' => ['org'],
15621570
'text/plain' => ['txt', 'text', 'conf', 'def', 'list', 'log', 'in', 'ini', 'asc'],
15631571
'text/prs.lines.tag' => ['dsc'],
15641572
'text/rdf' => ['rdf', 'rdfs', 'owl'],
@@ -1610,6 +1618,7 @@ public function guessMimeType(string $path): ?string
16101618
'text/x-comma-separated-values' => ['csv'],
16111619
'text/x-common-lisp' => ['asd', 'fasl', 'lisp', 'ros'],
16121620
'text/x-component' => ['htc'],
1621+
'text/x-crystal' => ['cr'],
16131622
'text/x-csharp' => ['cs'],
16141623
'text/x-csrc' => ['c'],
16151624
'text/x-csv' => ['csv'],
@@ -1621,6 +1630,7 @@ public function guessMimeType(string $path): ?string
16211630
'text/x-dsrc' => ['d', 'di'],
16221631
'text/x-dtd' => ['dtd'],
16231632
'text/x-eiffel' => ['e', 'eif'],
1633+
'text/x-elixir' => ['ex', 'exs'],
16241634
'text/x-emacs-lisp' => ['el'],
16251635
'text/x-erlang' => ['erl'],
16261636
'text/x-fortran' => ['f', 'for', 'f77', 'f90', 'f95'],
@@ -1675,14 +1685,14 @@ public function guessMimeType(string $path): ?string
16751685
'text/x-pot' => ['pot'],
16761686
'text/x-processing' => ['pde'],
16771687
'text/x-python' => ['py', 'pyx', 'wsgi'],
1678-
'text/x-python3' => ['py', 'py3', 'py3x'],
1688+
'text/x-python3' => ['py', 'py3', 'py3x', 'pyi'],
16791689
'text/x-qml' => ['qml', 'qmltypes', 'qmlproject'],
16801690
'text/x-reject' => ['rej'],
16811691
'text/x-rpm-spec' => ['spec'],
16821692
'text/x-rst' => ['rst'],
16831693
'text/x-sagemath' => ['sage'],
16841694
'text/x-sass' => ['sass'],
1685-
'text/x-scala' => ['scala'],
1695+
'text/x-scala' => ['scala', 'sc'],
16861696
'text/x-scheme' => ['scm', 'ss'],
16871697
'text/x-scss' => ['scss'],
16881698
'text/x-setext' => ['etx'],
@@ -2025,7 +2035,9 @@ public function guessMimeType(string $path): ?string
20252035
'cpio.gz' => ['application/x-cpio-compressed'],
20262036
'cpp' => ['text/x-c', 'text/x-c++src'],
20272037
'cpt' => ['application/mac-compactpro'],
2038+
'cr' => ['text/crystal', 'text/x-crystal'],
20282039
'cr2' => ['image/x-canon-cr2'],
2040+
'cr3' => ['image/x-canon-cr3'],
20292041
'crd' => ['application/x-mscardfile'],
20302042
'crdownload' => ['application/x-partial-download'],
20312043
'crl' => ['application/pkix-crl'],
@@ -2164,9 +2176,11 @@ public function guessMimeType(string $path): ?string
21642176
'etx' => ['text/x-setext'],
21652177
'eva' => ['application/x-eva'],
21662178
'evy' => ['application/x-envoy'],
2179+
'ex' => ['text/x-elixir'],
21672180
'exe' => ['application/x-ms-dos-executable', 'application/x-msdos-program', 'application/x-msdownload'],
21682181
'exi' => ['application/exi'],
21692182
'exr' => ['image/aces', 'image/x-exr'],
2183+
'exs' => ['text/x-elixir'],
21702184
'ext' => ['application/vnd.novadigm.ext'],
21712185
'ez' => ['application/andrew-inset'],
21722186
'ez2' => ['application/vnd.ezpix-album'],
@@ -2428,12 +2442,13 @@ public function guessMimeType(string $path): ?string
24282442
'jrd' => ['application/jrd+json'],
24292443
'js' => ['text/javascript', 'application/javascript', 'application/x-javascript'],
24302444
'jsm' => ['application/javascript', 'application/x-javascript', 'text/javascript'],
2431-
'json' => ['application/json'],
2445+
'json' => ['application/json', 'application/schema+json'],
24322446
'json-patch' => ['application/json-patch+json'],
24332447
'json5' => ['application/json5'],
24342448
'jsonld' => ['application/ld+json'],
24352449
'jsonml' => ['application/jsonml+json'],
24362450
'jsx' => ['text/jsx'],
2451+
'jxl' => ['image/jxl'],
24372452
'jxr' => ['image/jxr'],
24382453
'jxra' => ['image/jxra'],
24392454
'jxrs' => ['image/jxrs'],
@@ -2468,6 +2483,7 @@ public function guessMimeType(string $path): ?string
24682483
'kpt' => ['application/vnd.kde.kpresenter', 'application/x-kpresenter'],
24692484
'kpxx' => ['application/vnd.ds-keypoint'],
24702485
'kra' => ['application/x-krita'],
2486+
'krz' => ['application/x-krita'],
24712487
'ks' => ['application/x-java-keystore'],
24722488
'ksp' => ['application/vnd.kde.kspread', 'application/x-kspread'],
24732489
'ksy' => ['text/x-kaitai-struct'],
@@ -2611,7 +2627,7 @@ public function guessMimeType(string $path): ?string
26112627
'mo3' => ['audio/x-mo3'],
26122628
'mobi' => ['application/x-mobipocket-ebook'],
26132629
'moc' => ['text/x-moc'],
2614-
'mod' => ['audio/x-mod'],
2630+
'mod' => ['application/x-object', 'audio/x-mod'],
26152631
'mods' => ['application/mods+xml'],
26162632
'mof' => ['text/x-mof'],
26172633
'moov' => ['video/quicktime'],
@@ -2668,6 +2684,7 @@ public function guessMimeType(string $path): ?string
26682684
'musd' => ['application/mmt-usd+xml'],
26692685
'musicxml' => ['application/vnd.recordare.musicxml+xml'],
26702686
'mvb' => ['application/x-msmediaview'],
2687+
'mvt' => ['application/vnd.mapbox-vector-tile'],
26712688
'mwf' => ['application/vnd.mfer'],
26722689
'mxf' => ['application/mxf'],
26732690
'mxl' => ['application/vnd.recordare.musicxml'],
@@ -2746,7 +2763,7 @@ public function guessMimeType(string $path): ?string
27462763
'opus' => ['audio/ogg', 'audio/x-ogg', 'audio/x-opus+ogg'],
27472764
'ora' => ['image/openraster'],
27482765
'orf' => ['image/x-olympus-orf'],
2749-
'org' => ['application/vnd.lotus-organizer', 'text/x-org'],
2766+
'org' => ['application/vnd.lotus-organizer', 'text/org', 'text/x-org'],
27502767
'osf' => ['application/vnd.yamaha.openscoreformat'],
27512768
'osfpvg' => ['application/vnd.yamaha.openscoreformat.osfpvg+xml'],
27522769
'osm' => ['application/vnd.openstreetmap.data+xml'],
@@ -2891,6 +2908,7 @@ public function guessMimeType(string $path): ?string
28912908
'py3x' => ['text/x-python3'],
28922909
'pya' => ['audio/vnd.ms-playready.media.pya'],
28932910
'pyc' => ['application/x-python-bytecode'],
2911+
'pyi' => ['text/x-python3'],
28942912
'pyo' => ['application/x-python-bytecode'],
28952913
'pys' => ['application/x-pyspread-bz-spreadsheet'],
28962914
'pysu' => ['application/x-pyspread-spreadsheet'],
@@ -2993,7 +3011,7 @@ public function guessMimeType(string $path): ?string
29933011
'sass' => ['text/x-sass'],
29943012
'sav' => ['application/x-spss-sav', 'application/x-spss-savefile'],
29953013
'sbml' => ['application/sbml+xml'],
2996-
'sc' => ['application/vnd.ibm.secure-container'],
3014+
'sc' => ['application/vnd.ibm.secure-container', 'text/x-scala'],
29973015
'scala' => ['text/x-scala'],
29983016
'scd' => ['application/x-msschedule'],
29993017
'scm' => ['application/vnd.lotus-screencam', 'text/x-scheme'],
@@ -3121,6 +3139,8 @@ public function guessMimeType(string $path): ?string
31213139
'stk' => ['application/hyperstudio'],
31223140
'stl' => ['application/vnd.ms-pki.stl', 'model/stl', 'model/x.stl-ascii', 'model/x.stl-binary'],
31233141
'stm' => ['audio/x-stm'],
3142+
'stpxz' => ['model/step-xml+zip'],
3143+
'stpz' => ['model/step+zip'],
31243144
'str' => ['application/vnd.pg.format'],
31253145
'stw' => ['application/vnd.sun.xml.writer.template'],
31263146
'sty' => ['application/x-tex', 'text/x-tex'],

src/Symfony/Component/Mime/Resources/bin/update_mime_types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

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

0 commit comments

Comments
 (0)