diff --git a/.github/workflows/mime.yaml b/.github/workflows/mime.yaml index 03144c4e45..21168d7dce 100644 --- a/.github/workflows/mime.yaml +++ b/.github/workflows/mime.yaml @@ -45,6 +45,6 @@ jobs: - name: Run tests run: dart test - - name: "Re run 'dart tool/media_types.dart' to update doc/media_types.md" - run: dart tool/media_types.dart + - name: "Re run 'dart tool/regenerate_tables.dart' to update doc/media_types.md" + run: dart tool/regenerate_tables.dart - run: git diff --exit-code diff --git a/pkgs/mime/CHANGELOG.md b/pkgs/mime/CHANGELOG.md index fd5a24905c..df0d6dcf43 100644 --- a/pkgs/mime/CHANGELOG.md +++ b/pkgs/mime/CHANGELOG.md @@ -1,7 +1,93 @@ +## 2.1.0-wip + +* Switched to using the Apache httpd mime.conf table as the source of truth for + mime types. + +Mime type additions: +- `application/vnd.geogebra.slides` +- `font/collection` +- `image/jxl` +- `image/vnd.dvb.subtitle` +- `video/mp2t` + +Renamed mime types: +- `application/x-font-otf` => `font/otf` +- `application/x-font-ttf` => `font/ttf` +- `application/x-font-woff` => `font/woff` + +Removed mime types: +- `model/vnd.mts` + +Mime types where the default file extension changed: +- `application/inkml+xml`, `inkml` => `ink` +- `application/octet-stream`, `so` => `bin` +- `application/onenote`, `onetoc2` => `onetoc` +- `application/pgp-signature`, `sig` => `asc` +- `application/tei+xml`, `teicorpus` => `tei` +- `application/vnd.adobe.fxp`, `fxpl` => `fxp` +- `application/vnd.clonk.c4group`, `c4u` => `c4g` +- `application/vnd.dece.data`, `uvvf` => `uvf` +- `application/vnd.dece.ttml+xml`, `uvvt` => `uvt` +- `application/vnd.eszigno3+xml`, `et3` => `es3` +- `application/vnd.framemaker`, `maker` => `fm` +- `application/vnd.geometry-explorer`, `gre` => `gex` +- `application/vnd.grafeq`, `gqs` => `gqf` +- `application/vnd.ibm.modcap`, `listafp` => `afp` +- `application/vnd.iccprofile`, `icm` => `icc` +- `application/vnd.intercon.formnet`, `xpx` => `xpw` +- `application/vnd.kde.kpresenter`, `kpt` => `kpr` +- `application/vnd.kde.kword`, `kwt` => `kwd` +- `application/vnd.kinar`, `knp` => `kne` +- `application/vnd.koan`, `skt` => `skp` +- `application/vnd.ms-project`, `mpt` => `mpp` +- `application/vnd.palm`, `pqa` => `pdb` +- `application/vnd.quark.quarkxpress`, `qxt` => `qxd` +- `application/vnd.simtech-mindmapper`, `twds` => `twd` +- `application/vnd.stardivision.writer`, `vor` => `sdw` +- `application/vnd.sus-calendar`, `susp` => `sus` +- `application/vnd.symbian.install`, `sisx` => `sis` +- `application/vnd.ufdl`, `ufdl` => `ufd` +- `application/vnd.visio`, `vsw` => `vsd` +- `application/vnd.zul`, `zirz` => `zir` +- `application/x-authorware-bin`, `x32` => `aab` +- `application/x-blorb`, `blorb` => `blb` +- `application/x-cbr`, `cbz` => `cbr` +- `application/x-director`, `w3d` => `dir` +- `application/x-font-type1`, `pfm` => `pfa` +- `application/x-msdownload`, `msi` => `exe` +- `application/x-pkcs12`, `pfx` => `p12` +- `application/x-pkcs7-certificates`, `spc` => `p7b` +- `application/x-zmachine`, `z8` => `z1` +- `application/xv+xml`, `xvml` => `mxml` +- `audio/basic`, snd => `au` +- `audio/mpeg`, mpga => `mp3` +- `audio/vnd.dece.audio`, `uvva` => `uva` +- `image/tiff`, `tif` => `tiff` +- `image/vnd.dece.graphic`, `uvvi` => `uvi` +- `image/x-freehand`, `fhc` => `fh` +- `message/rfc822`, `mime` => `eml` +- `model/mesh`, `silo` => `msh` +- `model/x3d+binary`, `x3dbz` => `x3db` +- `model/x3d+vrml`, `x3dvz` => `x3dv` +- `model/x3d+xml`, `x3dz` => `x3d` +- `text/troff`, `tr` => `t` +- `text/uri-list`, `urls` => `uri` +- `text/x-fortran`, `for` => `f` +- `video/mj2`, `mjp2` => `mj2` +- `video/vnd.dece.hd`, `uvvh` => `uvh` +- `video/vnd.dece.mobile`, `uvvm` => `uvm` +- `video/vnd.dece.pd`, `uvvp` => `uvp` +- `video/vnd.dece.sd`, `uvvs` => `uvs` +- `video/vnd.dece.video`, `uvvv` => `uvv` +- `video/vnd.uvvu.mp4`, `uvvu` => `uvu` +- `video/x-ms-asf`, `asx` => `asf` + ## 2.0.0 -* **[Breaking]** `extensionFromMime(String mimeType)` returns `null` instead of `mimeType` for an unknown mime type. -* Update `extensionFromMime` to return a default extension when a MIME type maps to multiple extensions. +* **[Breaking]** `extensionFromMime(String mimeType)` returns `null` instead of + `mimeType` for an unknown mime type. +* Update `extensionFromMime` to return a default extension when a MIME type maps + to multiple extensions. ## 1.0.6 diff --git a/pkgs/mime/doc/media_types.md b/pkgs/mime/doc/media_types.md index 1b41cbd53c..5fa2cd8a84 100644 --- a/pkgs/mime/doc/media_types.md +++ b/pkgs/mime/doc/media_types.md @@ -32,7 +32,7 @@ Supported media types and file extensions. | application/gpx+xml | gpx | | | application/gxf | gxf | | | application/hyperstudio | stk | | -| application/inkml+xml | inkml | ink | +| application/inkml+xml | ink | inkml | | application/ipfix | ipfix | | | application/java-archive | jar | | | application/java-serialized-object | ser | | @@ -58,17 +58,17 @@ Supported media types and file extensions. | application/mp4 | mp4s | | | application/msword | doc | dot | | application/mxf | mxf | | -| application/octet-stream | so | bin, bpk, deploy, dist, distz, dms, dump, elc, lrf, mar, pkg | +| application/octet-stream | bin | bpk, deploy, dist, distz, dms, dump, elc, lrf, mar, pkg, so | | application/oda | oda | | | application/oebps-package+xml | opf | | | application/ogg | ogx | | | application/omdoc+xml | omdoc | | -| application/onenote | onetoc2 | onepkg, onetmp, onetoc | +| application/onenote | onetoc | onepkg, onetmp, onetoc2 | | application/oxps | oxps | | | application/patch-ops-error+xml | xer | | | application/pdf | pdf | | | application/pgp-encrypted | pgp | | -| application/pgp-signature | sig | asc | +| application/pgp-signature | asc | sig | | application/pics-rules | prf | | | application/pkcs10 | p10 | | | application/pkcs7-mime | p7m | p7c | @@ -112,7 +112,7 @@ Supported media types and file extensions. | application/sru+xml | sru | | | application/ssdl+xml | ssdl | | | application/ssml+xml | ssml | | -| application/tei+xml | teicorpus | tei | +| application/tei+xml | tei | teicorpus | | application/thraud+xml | tfi | | | application/timestamped-data | tsd | | | application/toml | toml | | @@ -127,7 +127,7 @@ Supported media types and file extensions. | application/vnd.acucorp | atc | acutc | | application/vnd.adobe.air-application-installer-package+zip | air | | | application/vnd.adobe.formscentral.fcdt | fcdt | | -| application/vnd.adobe.fxp | fxpl | fxp | +| application/vnd.adobe.fxp | fxp | fxpl | | application/vnd.adobe.xdp+xml | xdp | | | application/vnd.adobe.xfdf | xfdf | | | application/vnd.ahead.space | ahead | | @@ -153,7 +153,7 @@ Supported media types and file extensions. | application/vnd.cinderella | cdy | | | application/vnd.claymore | cla | | | application/vnd.cloanto.rp9 | rp9 | | -| application/vnd.clonk.c4group | c4u | c4d, c4f, c4g, c4p | +| application/vnd.clonk.c4group | c4g | c4d, c4f, c4p, c4u | | application/vnd.cluetrust.cartomobile-config | c11amc | | | application/vnd.cluetrust.cartomobile-config-pkg | c11amz | | | application/vnd.commonspace | csp | | @@ -170,11 +170,11 @@ Supported media types and file extensions. | application/vnd.curl.car | car | | | application/vnd.curl.pcurl | pcurl | | | application/vnd.data-vision.rdz | rdz | | -| application/vnd.dece.data | uvvf | uvd, uvf, uvvd | -| application/vnd.dece.ttml+xml | uvvt | uvt | +| application/vnd.dece.data | uvf | uvd, uvvd, uvvf | +| application/vnd.dece.ttml+xml | uvt | uvvt | | application/vnd.dece.unspecified | uvx | uvvx | | application/vnd.dece.zip | uvz | uvvz | -| application/vnd.denovo.fcselayout-link | fe\_launch | | +| application/vnd.denovo.fcselayout-link | fe_launch | | | application/vnd.dna | dna | | | application/vnd.dolby.mlp | mlp | | | application/vnd.dpgraph | dpg | | @@ -190,7 +190,7 @@ Supported media types and file extensions. | application/vnd.epson.quickanime | qam | | | application/vnd.epson.salt | slt | | | application/vnd.epson.ssf | ssf | | -| application/vnd.eszigno3+xml | et3 | es3 | +| application/vnd.eszigno3+xml | es3 | et3 | | application/vnd.ezpix-album | ez2 | | | application/vnd.ezpix-package | ez3 | | | application/vnd.fdf | fdf | | @@ -198,7 +198,7 @@ Supported media types and file extensions. | application/vnd.fdsn.seed | seed | dataless | | application/vnd.flographit | gph | | | application/vnd.fluxtime.clip | ftc | | -| application/vnd.framemaker | maker | book, fm, frame | +| application/vnd.framemaker | fm | book, frame, maker | | application/vnd.frogans.fnc | fnc | | | application/vnd.frogans.ltf | ltf | | | application/vnd.fsc.weblaunch | fsc | | @@ -213,15 +213,16 @@ Supported media types and file extensions. | application/vnd.fuzzysheet | fzs | | | application/vnd.genomatix.tuxedo | txd | | | application/vnd.geogebra.file | ggb | | +| application/vnd.geogebra.slides | ggs | | | application/vnd.geogebra.tool | ggt | | -| application/vnd.geometry-explorer | gre | gex | +| application/vnd.geometry-explorer | gex | gre | | application/vnd.geonext | gxt | | | application/vnd.geoplan | g2w | | | application/vnd.geospace | g3w | | | application/vnd.gmx | gmx | | | application/vnd.google-earth.kml+xml | kml | | | application/vnd.google-earth.kmz | kmz | | -| application/vnd.grafeq | gqs | gqf | +| application/vnd.grafeq | gqf | gqs | | application/vnd.groove-account | gac | | | application/vnd.groove-help | ghf | | | application/vnd.groove-identity-message | gim | | @@ -241,15 +242,15 @@ Supported media types and file extensions. | application/vnd.hp-pclxl | pclxl | | | application/vnd.hydrostatix.sof-data | sfd-hdstx | | | application/vnd.ibm.minipay | mpy | | -| application/vnd.ibm.modcap | listafp | afp, list3820 | +| application/vnd.ibm.modcap | afp | list3820, listafp | | application/vnd.ibm.rights-management | irm | | | application/vnd.ibm.secure-container | sc | | -| application/vnd.iccprofile | icm | icc | +| application/vnd.iccprofile | icc | icm | | application/vnd.igloader | igl | | | application/vnd.immervision-ivp | ivp | | | application/vnd.immervision-ivu | ivu | | | application/vnd.insors.igm | igm | | -| application/vnd.intercon.formnet | xpx | xpw | +| application/vnd.intercon.formnet | xpw | xpx | | application/vnd.intergeo | i2g | | | application/vnd.intu.qbo | qbo | | | application/vnd.intu.qfx | qfx | | @@ -267,13 +268,13 @@ Supported media types and file extensions. | application/vnd.kde.kformula | kfo | | | application/vnd.kde.kivio | flw | | | application/vnd.kde.kontour | kon | | -| application/vnd.kde.kpresenter | kpt | kpr | +| application/vnd.kde.kpresenter | kpr | kpt | | application/vnd.kde.kspread | ksp | | -| application/vnd.kde.kword | kwt | kwd | +| application/vnd.kde.kword | kwd | kwt | | application/vnd.kenameaapp | htke | | | application/vnd.kidspiration | kia | | -| application/vnd.kinar | knp | kne | -| application/vnd.koan | skt | skd, skm, skp | +| application/vnd.kinar | kne | knp | +| application/vnd.koan | skp | skd, skm, skt | | application/vnd.kodak-descriptor | sse | | | application/vnd.las.las+xml | lasxml | | | application/vnd.llamagraphics.life-balance.desktop | lbd | | @@ -324,7 +325,7 @@ Supported media types and file extensions. | application/vnd.ms-powerpoint.slide.macroenabled.12 | sldm | | | application/vnd.ms-powerpoint.slideshow.macroenabled.12 | ppsm | | | application/vnd.ms-powerpoint.template.macroenabled.12 | potm | | -| application/vnd.ms-project | mpt | mpp | +| application/vnd.ms-project | mpp | mpt | | application/vnd.ms-word.document.macroenabled.12 | docm | | | application/vnd.ms-word.template.macroenabled.12 | dotm | | | application/vnd.ms-works | wps | wcm, wdb, wks | @@ -377,7 +378,7 @@ Supported media types and file extensions. | application/vnd.osgeo.mapguide.package | mgp | | | application/vnd.osgi.dp | dp | | | application/vnd.osgi.subsystem | esa | | -| application/vnd.palm | pqa | oprc, pdb | +| application/vnd.palm | pdb | oprc, pqa | | application/vnd.pawaafile | paw | | | application/vnd.pg.format | str | | | application/vnd.pg.osasli | ei6 | | @@ -389,7 +390,7 @@ Supported media types and file extensions. | application/vnd.proteus.magazine | mgz | | | application/vnd.publishare-delta-tree | qps | | | application/vnd.pvi.ptid1 | ptid | | -| application/vnd.quark.quarkxpress | qxt | qwd, qwt, qxb, qxd, qxl | +| application/vnd.quark.quarkxpress | qxd | qwd, qwt, qxb, qxl, qxt | | application/vnd.realvnc.bed | bed | | | application/vnd.recordare.musicxml | mxl | | | application/vnd.recordare.musicxml+xml | musicxml | | @@ -407,7 +408,7 @@ Supported media types and file extensions. | application/vnd.shana.informed.formtemplate | itp | | | application/vnd.shana.informed.interchange | iif | | | application/vnd.shana.informed.package | ipk | | -| application/vnd.simtech-mindmapper | twds | twd | +| application/vnd.simtech-mindmapper | twd | twds | | application/vnd.smaf | mmf | | | application/vnd.smart.teacher | teacher | | | application/vnd.solent.sdkm+xml | sdkm | sdkd | @@ -417,7 +418,7 @@ Supported media types and file extensions. | application/vnd.stardivision.draw | sda | | | application/vnd.stardivision.impress | sdd | | | application/vnd.stardivision.math | smf | | -| application/vnd.stardivision.writer | vor | sdw | +| application/vnd.stardivision.writer | sdw | vor | | application/vnd.stardivision.writer-global | sgl | | | application/vnd.stepmania.package | smzip | | | application/vnd.stepmania.stepchart | sm | | @@ -431,9 +432,9 @@ Supported media types and file extensions. | application/vnd.sun.xml.writer | sxw | | | application/vnd.sun.xml.writer.global | sxg | | | application/vnd.sun.xml.writer.template | stw | | -| application/vnd.sus-calendar | susp | sus | +| application/vnd.sus-calendar | sus | susp | | application/vnd.svd | svd | | -| application/vnd.symbian.install | sisx | sis | +| application/vnd.symbian.install | sis | sisx | | application/vnd.syncml+xml | xsm | | | application/vnd.syncml.dm+wbxml | bdm | | | application/vnd.syncml.dm+xml | xdm | | @@ -443,13 +444,13 @@ Supported media types and file extensions. | application/vnd.trid.tpt | tpt | | | application/vnd.triscape.mxs | mxs | | | application/vnd.trueapp | tra | | -| application/vnd.ufdl | ufdl | ufd | +| application/vnd.ufdl | ufd | ufdl | | application/vnd.uiq.theme | utz | | | application/vnd.umajin | umj | | | application/vnd.unity | unityweb | | | application/vnd.uoml+xml | uoml | | | application/vnd.vcx | vcx | | -| application/vnd.visio | vsw | vsd, vss, vst | +| application/vnd.visio | vsd | vss, vst, vsw | | application/vnd.visionary | vis | | | application/vnd.vsf | vsf | | | application/vnd.wap.wbxml | wbxml | | @@ -470,7 +471,7 @@ Supported media types and file extensions. | application/vnd.yamaha.smaf-audio | saf | | | application/vnd.yamaha.smaf-phrase | spf | | | application/vnd.yellowriver-custom-menu | cmp | | -| application/vnd.zul | zirz | zir | +| application/vnd.zul | zir | zirz | | application/vnd.zzazz.deck+xml | zaz | | | application/voicexml+xml | vxml | | | application/wasm | wasm | | @@ -482,15 +483,15 @@ Supported media types and file extensions. | application/x-abiword | abw | | | application/x-ace-compressed | ace | | | application/x-apple-diskimage | dmg | | -| application/x-authorware-bin | x32 | aab, u32, vox | +| application/x-authorware-bin | aab | u32, vox, x32 | | application/x-authorware-map | aam | | | application/x-authorware-seg | aas | | | application/x-bcpio | bcpio | | | application/x-bittorrent | torrent | | -| application/x-blorb | blorb | blb | +| application/x-blorb | blb | blorb | | application/x-bzip | bz | | | application/x-bzip2 | bz2 | boz | -| application/x-cbr | cbz | cb7, cba, cbr, cbt | +| application/x-cbr | cbr | cb7, cba, cbt, cbz | | application/x-cdlink | vcd | | | application/x-cfs-compressed | cfs | | | application/x-chat | chat | | @@ -500,7 +501,7 @@ Supported media types and file extensions. | application/x-csh | csh | | | application/x-debian-package | deb | udeb | | application/x-dgc-compressed | dgc | | -| application/x-director | w3d | cct, cst, cxt, dcr, dir, dxr, fgd, swa | +| application/x-director | dir | cct, cst, cxt, dcr, dxr, fgd, swa, w3d | | application/x-doom | wad | | | application/x-dtbncx+xml | ncx | | | application/x-dtbook+xml | dtb | | @@ -511,12 +512,9 @@ Supported media types and file extensions. | application/x-font-bdf | bdf | | | application/x-font-ghostscript | gsf | | | application/x-font-linux-psf | psf | | -| application/x-font-otf | otf | | | application/x-font-pcf | pcf | | | application/x-font-snf | snf | | -| application/x-font-ttf | ttf | ttc | -| application/x-font-type1 | pfm | afm, pfa, pfb | -| application/x-font-woff | woff | | +| application/x-font-type1 | pfa | afm, pfb, pfm | | application/x-freearc | arc | | | application/x-futuresplash | spl | | | application/x-gca-compressed | gca | | @@ -541,9 +539,9 @@ Supported media types and file extensions. | application/x-msbinder | obd | | | application/x-mscardfile | crd | | | application/x-msclip | clp | | -| application/x-msdownload | msi | bat, com, dll, exe | +| application/x-msdownload | exe | bat, com, dll, msi | | application/x-msmediaview | mvb | m13, m14 | -| application/x-msmetafile | wmf | emf, emz | +| application/x-msmetafile | wmf | emf, emz, wmz | | application/x-msmoney | mny | | | application/x-mspublisher | pub | | | application/x-msschedule | scd | | @@ -551,8 +549,8 @@ Supported media types and file extensions. | application/x-mswrite | wri | | | application/x-netcdf | nc | cdf | | application/x-nzb | nzb | | -| application/x-pkcs12 | pfx | p12 | -| application/x-pkcs7-certificates | spc | p7b | +| application/x-pkcs12 | p12 | pfx | +| application/x-pkcs7-certificates | p7b | spc | | application/x-pkcs7-certreqresp | p7r | | | application/x-rar-compressed | rar | | | application/x-research-info-systems | ris | | @@ -581,7 +579,7 @@ Supported media types and file extensions. | application/x-xliff+xml | xlf | | | application/x-xpinstall | xpi | | | application/x-xz | xz | | -| application/x-zmachine | z8 | z1, z2, z3, z4, z5, z6, z7 | +| application/x-zmachine | z1 | z2, z3, z4, z5, z6, z7, z8 | | application/xaml+xml | xaml | | | application/xcap-diff+xml | xdf | | | application/xenc+xml | xenc | | @@ -592,20 +590,20 @@ Supported media types and file extensions. | application/xproc+xml | xpl | | | application/xslt+xml | xslt | | | application/xspf+xml | xspf | | -| application/xv+xml | xvml | mxml, xhvml, xvm | +| application/xv+xml | mxml | xhvml, xvm, xvml | | application/yang | yang | | | application/yin+xml | yin | | | application/zip | zip | | | audio/aac | aac | | | audio/adpcm | adp | | -| audio/basic | snd | au | +| audio/basic | au | snd | | audio/midi | mid | kar, midi, rmi | -| audio/mp4 | m4a | m4b, mp4a | -| audio/mpeg | mpga | m2a, m3a, mp2, mp2a, mp3 | -| audio/ogg | ogg | oga, spx | +| audio/mp4 | m4a | mp4a | +| audio/mpeg | mp3 | m2a, m3a, mp2, mp2a, mpga | +| audio/ogg | ogg | oga, opus, spx | | audio/s3m | s3m | | | audio/silk | sil | | -| audio/vnd.dece.audio | uvva | uva | +| audio/vnd.dece.audio | uva | uvva | | audio/vnd.digital-winds | eol | | | audio/vnd.dra | dra | | | audio/vnd.dts | dts | | @@ -634,6 +632,10 @@ Supported media types and file extensions. | chemical/x-cml | cml | | | chemical/x-csml | csml | | | chemical/x-xyz | xyz | | +| font/collection | ttc | | +| font/otf | otf | | +| font/ttf | ttf | | +| font/woff | woff | | | font/woff2 | woff2 | | | image/avif | avif | | | image/bmp | bmp | | @@ -644,15 +646,17 @@ Supported media types and file extensions. | image/heif | heif | | | image/ief | ief | | | image/jpeg | jpg | jpe, jpeg | +| image/jxl | jxl | | | image/ktx | ktx | | | image/png | png | | | image/prs.btif | btif | | | image/sgi | sgi | | | image/svg+xml | svg | svgz | -| image/tiff | tif | tiff | +| image/tiff | tiff | tif | | image/vnd.adobe.photoshop | psd | | -| image/vnd.dece.graphic | uvvi | uvg, uvi, uvvg | +| image/vnd.dece.graphic | uvi | uvg, uvvg, uvvi | | image/vnd.djvu | djvu | djv | +| image/vnd.dvb.subtitle | sub | | | image/vnd.dwg | dwg | | | image/vnd.dxf | dxf | | | image/vnd.fastbidsheet | fbs | | @@ -669,7 +673,7 @@ Supported media types and file extensions. | image/x-3ds | 3ds | | | image/x-cmu-raster | ras | | | image/x-cmx | cmx | | -| image/x-freehand | fhc | fh, fh4, fh5, fh7 | +| image/x-freehand | fh | fh4, fh5, fh7, fhc | | image/x-icon | ico | | | image/x-mrsid-image | sid | | | image/x-pcx | pcx | | @@ -683,21 +687,20 @@ Supported media types and file extensions. | image/x-xbitmap | xbm | | | image/x-xpixmap | xpm | | | image/x-xwindowdump | xwd | | -| message/rfc822 | mime | eml | +| message/rfc822 | eml | mime | | model/gltf+json | gltf | | | model/gltf-binary | glb | | | model/iges | igs | iges | -| model/mesh | silo | mesh, msh | +| model/mesh | msh | mesh, silo | | model/vnd.collada+xml | dae | | | model/vnd.dwf | dwf | | | model/vnd.gdl | gdl | | | model/vnd.gtw | gtw | | -| model/vnd.mts | mts | | | model/vnd.vtu | vtu | | | model/vrml | vrml | wrl | -| model/x3d+binary | x3dbz | x3db | -| model/x3d+vrml | x3dvz | x3dv | -| model/x3d+xml | x3dz | x3d | +| model/x3d+binary | x3db | x3dbz | +| model/x3d+vrml | x3dv | x3dvz | +| model/x3d+xml | x3d | x3dz | | text/cache-manifest | appcache | | | text/calendar | ics | ifb | | text/css | css | | @@ -711,9 +714,9 @@ Supported media types and file extensions. | text/richtext | rtx | | | text/sgml | sgml | sgm | | text/tab-separated-values | tsv | | -| text/troff | tr | man, me, ms, roff, t | +| text/troff | t | man, me, ms, roff, tr | | text/turtle | ttl | | -| text/uri-list | urls | uri, uris | +| text/uri-list | uri | uris, urls | | text/vcard | vcard | | | text/vnd.curl | curl | | | text/vnd.curl.dcurl | dcurl | | @@ -731,7 +734,7 @@ Supported media types and file extensions. | text/x-asm | asm | s | | text/x-c | c | cc, cpp, cxx, dic, h, hh | | text/x-dart | dart | | -| text/x-fortran | for | f, f77, f90 | +| text/x-fortran | f | f77, f90, for | | text/x-java-source | java | | | text/x-nfo | nfo | | | text/x-opml | opml | | @@ -748,21 +751,22 @@ Supported media types and file extensions. | video/h264 | h264 | | | video/jpeg | jpgv | | | video/jpm | jpm | jpgm | -| video/mj2 | mjp2 | mj2 | +| video/mj2 | mj2 | mjp2 | +| video/mp2t | ts | m2t, m2ts, mts | | video/mp4 | mp4 | mp4v, mpg4 | | video/mpeg | mpg | m1v, m2v, mpe, mpeg | | video/ogg | ogv | | | video/quicktime | mov | qt | -| video/vnd.dece.hd | uvvh | uvh | -| video/vnd.dece.mobile | uvvm | uvm | -| video/vnd.dece.pd | uvvp | uvp | -| video/vnd.dece.sd | uvvs | uvs | -| video/vnd.dece.video | uvvv | uvv | +| video/vnd.dece.hd | uvh | uvvh | +| video/vnd.dece.mobile | uvm | uvvm | +| video/vnd.dece.pd | uvp | uvvp | +| video/vnd.dece.sd | uvs | uvvs | +| video/vnd.dece.video | uvv | uvvv | | video/vnd.dvb.file | dvb | | | video/vnd.fvt | fvt | | | video/vnd.mpegurl | mxu | m4u | | video/vnd.ms-playready.media.pyv | pyv | | -| video/vnd.uvvu.mp4 | uvvu | uvu | +| video/vnd.uvvu.mp4 | uvu | uvvu | | video/vnd.vivo | viv | | | video/webm | webm | | | video/x-f4v | f4v | | @@ -771,7 +775,7 @@ Supported media types and file extensions. | video/x-m4v | m4v | | | video/x-matroska | mkv | mk3d, mks | | video/x-mng | mng | | -| video/x-ms-asf | asx | asf | +| video/x-ms-asf | asf | asx | | video/x-ms-vob | vob | | | video/x-ms-wm | wm | | | video/x-ms-wmv | wmv | | diff --git a/pkgs/mime/lib/src/default_extension_map.dart b/pkgs/mime/lib/src/default_extension_map.dart index 287c957dc5..e90be38ec3 100644 --- a/pkgs/mime/lib/src/default_extension_map.dart +++ b/pkgs/mime/lib/src/default_extension_map.dart @@ -2,1011 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -const Map defaultExtensionMap = { - '123': 'application/vnd.lotus-1-2-3', - '3dml': 'text/vnd.in3d.3dml', - '3ds': 'image/x-3ds', - '3g2': 'video/3gpp2', - '3gp': 'video/3gpp', - '7z': 'application/x-7z-compressed', - 'aab': 'application/x-authorware-bin', - 'aac': 'audio/aac', - 'aam': 'application/x-authorware-map', - 'aas': 'application/x-authorware-seg', - 'abw': 'application/x-abiword', - 'ac': 'application/pkix-attr-cert', - 'acc': 'application/vnd.americandynamics.acc', - 'ace': 'application/x-ace-compressed', - 'acu': 'application/vnd.acucobol', - 'acutc': 'application/vnd.acucorp', - 'adp': 'audio/adpcm', - 'aep': 'application/vnd.audiograph', - 'afm': 'application/x-font-type1', - 'afp': 'application/vnd.ibm.modcap', - 'ahead': 'application/vnd.ahead.space', - 'ai': 'application/postscript', - 'aif': 'audio/x-aiff', - 'aifc': 'audio/x-aiff', - 'aiff': 'audio/x-aiff', - 'air': 'application/vnd.adobe.air-application-installer-package+zip', - 'ait': 'application/vnd.dvb.ait', - 'ami': 'application/vnd.amiga.ami', - 'apk': 'application/vnd.android.package-archive', - 'appcache': 'text/cache-manifest', - 'application': 'application/x-ms-application', - 'apr': 'application/vnd.lotus-approach', - 'arc': 'application/x-freearc', - 'asc': 'application/pgp-signature', - 'asf': 'video/x-ms-asf', - 'asm': 'text/x-asm', - 'aso': 'application/vnd.accpac.simply.aso', - 'asx': 'video/x-ms-asf', - 'atc': 'application/vnd.acucorp', - 'atom': 'application/atom+xml', - 'atomcat': 'application/atomcat+xml', - 'atomsvc': 'application/atomsvc+xml', - 'atx': 'application/vnd.antix.game-component', - 'au': 'audio/basic', - 'avi': 'video/x-msvideo', - 'avif': 'image/avif', - 'aw': 'application/applixware', - 'azf': 'application/vnd.airzip.filesecure.azf', - 'azs': 'application/vnd.airzip.filesecure.azs', - 'azw': 'application/vnd.amazon.ebook', - 'bat': 'application/x-msdownload', - 'bcpio': 'application/x-bcpio', - 'bdf': 'application/x-font-bdf', - 'bdm': 'application/vnd.syncml.dm+wbxml', - 'bed': 'application/vnd.realvnc.bed', - 'bh2': 'application/vnd.fujitsu.oasysprs', - 'bin': 'application/octet-stream', - 'blb': 'application/x-blorb', - 'blorb': 'application/x-blorb', - 'bmi': 'application/vnd.bmi', - 'bmp': 'image/bmp', - 'book': 'application/vnd.framemaker', - 'box': 'application/vnd.previewsystems.box', - 'boz': 'application/x-bzip2', - 'bpk': 'application/octet-stream', - 'btif': 'image/prs.btif', - 'bz': 'application/x-bzip', - 'bz2': 'application/x-bzip2', - 'c': 'text/x-c', - 'c11amc': 'application/vnd.cluetrust.cartomobile-config', - 'c11amz': 'application/vnd.cluetrust.cartomobile-config-pkg', - 'c4d': 'application/vnd.clonk.c4group', - 'c4f': 'application/vnd.clonk.c4group', - 'c4g': 'application/vnd.clonk.c4group', - 'c4p': 'application/vnd.clonk.c4group', - 'c4u': 'application/vnd.clonk.c4group', - 'cab': 'application/vnd.ms-cab-compressed', - 'caf': 'audio/x-caf', - 'cap': 'application/vnd.tcpdump.pcap', - 'car': 'application/vnd.curl.car', - 'cat': 'application/vnd.ms-pki.seccat', - 'cb7': 'application/x-cbr', - 'cba': 'application/x-cbr', - 'cbr': 'application/x-cbr', - 'cbt': 'application/x-cbr', - 'cbz': 'application/x-cbr', - 'cc': 'text/x-c', - 'cct': 'application/x-director', - 'ccxml': 'application/ccxml+xml', - 'cdbcmsg': 'application/vnd.contact.cmsg', - 'cdf': 'application/x-netcdf', - 'cdkey': 'application/vnd.mediastation.cdkey', - 'cdmia': 'application/cdmi-capability', - 'cdmic': 'application/cdmi-container', - 'cdmid': 'application/cdmi-domain', - 'cdmio': 'application/cdmi-object', - 'cdmiq': 'application/cdmi-queue', - 'cdx': 'chemical/x-cdx', - 'cdxml': 'application/vnd.chemdraw+xml', - 'cdy': 'application/vnd.cinderella', - 'cer': 'application/pkix-cert', - 'cfs': 'application/x-cfs-compressed', - 'cgm': 'image/cgm', - 'chat': 'application/x-chat', - 'chm': 'application/vnd.ms-htmlhelp', - 'chrt': 'application/vnd.kde.kchart', - 'cif': 'chemical/x-cif', - 'cii': 'application/vnd.anser-web-certificate-issue-initiation', - 'cil': 'application/vnd.ms-artgalry', - 'cla': 'application/vnd.claymore', - 'class': 'application/java-vm', - 'clkk': 'application/vnd.crick.clicker.keyboard', - 'clkp': 'application/vnd.crick.clicker.palette', - 'clkt': 'application/vnd.crick.clicker.template', - 'clkw': 'application/vnd.crick.clicker.wordbank', - 'clkx': 'application/vnd.crick.clicker', - 'clp': 'application/x-msclip', - 'cmc': 'application/vnd.cosmocaller', - 'cmdf': 'chemical/x-cmdf', - 'cml': 'chemical/x-cml', - 'cmp': 'application/vnd.yellowriver-custom-menu', - 'cmx': 'image/x-cmx', - 'cod': 'application/vnd.rim.cod', - 'com': 'application/x-msdownload', - 'conf': 'text/plain', - 'cpio': 'application/x-cpio', - 'cpp': 'text/x-c', - 'cpt': 'application/mac-compactpro', - 'crd': 'application/x-mscardfile', - 'crl': 'application/pkix-crl', - 'crt': 'application/x-x509-ca-cert', - 'cryptonote': 'application/vnd.rig.cryptonote', - 'csh': 'application/x-csh', - 'csml': 'chemical/x-csml', - 'csp': 'application/vnd.commonspace', - 'css': 'text/css', - 'cst': 'application/x-director', - 'csv': 'text/csv', - 'cu': 'application/cu-seeme', - 'curl': 'text/vnd.curl', - 'cww': 'application/prs.cww', - 'cxt': 'application/x-director', - 'cxx': 'text/x-c', - 'dae': 'model/vnd.collada+xml', - 'daf': 'application/vnd.mobius.daf', - 'dart': 'text/x-dart', - 'dataless': 'application/vnd.fdsn.seed', - 'davmount': 'application/davmount+xml', - 'dbk': 'application/docbook+xml', - 'dcm': 'application/dicom', - 'dcr': 'application/x-director', - 'dcurl': 'text/vnd.curl.dcurl', - 'dd2': 'application/vnd.oma.dd2+xml', - 'ddd': 'application/vnd.fujixerox.ddd', - 'deb': 'application/x-debian-package', - 'def': 'text/plain', - 'deploy': 'application/octet-stream', - 'der': 'application/x-x509-ca-cert', - 'dfac': 'application/vnd.dreamfactory', - 'dgc': 'application/x-dgc-compressed', - 'dic': 'text/x-c', - 'dir': 'application/x-director', - 'dis': 'application/vnd.mobius.dis', - 'dist': 'application/octet-stream', - 'distz': 'application/octet-stream', - 'djv': 'image/vnd.djvu', - 'djvu': 'image/vnd.djvu', - 'dll': 'application/x-msdownload', - 'dmg': 'application/x-apple-diskimage', - 'dmp': 'application/vnd.tcpdump.pcap', - 'dms': 'application/octet-stream', - 'dna': 'application/vnd.dna', - 'doc': 'application/msword', - 'docm': 'application/vnd.ms-word.document.macroenabled.12', - 'docx': - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot': 'application/msword', - 'dotm': 'application/vnd.ms-word.template.macroenabled.12', - 'dotx': - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp': 'application/vnd.osgi.dp', - 'dpg': 'application/vnd.dpgraph', - 'dra': 'audio/vnd.dra', - 'dsc': 'text/prs.lines.tag', - 'dssc': 'application/dssc+der', - 'dtb': 'application/x-dtbook+xml', - 'dtd': 'application/xml-dtd', - 'dts': 'audio/vnd.dts', - 'dtshd': 'audio/vnd.dts.hd', - 'dump': 'application/octet-stream', - 'dvb': 'video/vnd.dvb.file', - 'dvi': 'application/x-dvi', - 'dwf': 'model/vnd.dwf', - 'dwg': 'image/vnd.dwg', - 'dxf': 'image/vnd.dxf', - 'dxp': 'application/vnd.spotfire.dxp', - 'dxr': 'application/x-director', - 'ecelp4800': 'audio/vnd.nuera.ecelp4800', - 'ecelp7470': 'audio/vnd.nuera.ecelp7470', - 'ecelp9600': 'audio/vnd.nuera.ecelp9600', - 'ecma': 'application/ecmascript', - 'edm': 'application/vnd.novadigm.edm', - 'edx': 'application/vnd.novadigm.edx', - 'efif': 'application/vnd.picsel', - 'ei6': 'application/vnd.pg.osasli', - 'elc': 'application/octet-stream', - 'emf': 'application/x-msmetafile', - 'eml': 'message/rfc822', - 'emma': 'application/emma+xml', - 'emz': 'application/x-msmetafile', - 'eol': 'audio/vnd.digital-winds', - 'eot': 'application/vnd.ms-fontobject', - 'eps': 'application/postscript', - 'epub': 'application/epub+zip', - 'es3': 'application/vnd.eszigno3+xml', - 'esa': 'application/vnd.osgi.subsystem', - 'esf': 'application/vnd.epson.esf', - 'et3': 'application/vnd.eszigno3+xml', - 'etx': 'text/x-setext', - 'eva': 'application/x-eva', - 'evy': 'application/x-envoy', - 'exe': 'application/x-msdownload', - 'exi': 'application/exi', - 'ext': 'application/vnd.novadigm.ext', - 'ez': 'application/andrew-inset', - 'ez2': 'application/vnd.ezpix-album', - 'ez3': 'application/vnd.ezpix-package', - 'f': 'text/x-fortran', - 'f4v': 'video/x-f4v', - 'f77': 'text/x-fortran', - 'f90': 'text/x-fortran', - 'fbs': 'image/vnd.fastbidsheet', - 'fcdt': 'application/vnd.adobe.formscentral.fcdt', - 'fcs': 'application/vnd.isac.fcs', - 'fdf': 'application/vnd.fdf', - 'fe_launch': 'application/vnd.denovo.fcselayout-link', - 'fg5': 'application/vnd.fujitsu.oasysgp', - 'fgd': 'application/x-director', - 'fh': 'image/x-freehand', - 'fh4': 'image/x-freehand', - 'fh5': 'image/x-freehand', - 'fh7': 'image/x-freehand', - 'fhc': 'image/x-freehand', - 'fig': 'application/x-xfig', - 'flac': 'audio/x-flac', - 'fli': 'video/x-fli', - 'flo': 'application/vnd.micrografx.flo', - 'flv': 'video/x-flv', - 'flw': 'application/vnd.kde.kivio', - 'flx': 'text/vnd.fmi.flexstor', - 'fly': 'text/vnd.fly', - 'fm': 'application/vnd.framemaker', - 'fnc': 'application/vnd.frogans.fnc', - 'for': 'text/x-fortran', - 'fpx': 'image/vnd.fpx', - 'frame': 'application/vnd.framemaker', - 'fsc': 'application/vnd.fsc.weblaunch', - 'fst': 'image/vnd.fst', - 'ftc': 'application/vnd.fluxtime.clip', - 'fti': 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt': 'video/vnd.fvt', - 'fxp': 'application/vnd.adobe.fxp', - 'fxpl': 'application/vnd.adobe.fxp', - 'fzs': 'application/vnd.fuzzysheet', - 'g2w': 'application/vnd.geoplan', - 'g3': 'image/g3fax', - 'g3w': 'application/vnd.geospace', - 'gac': 'application/vnd.groove-account', - 'gam': 'application/x-tads', - 'gbr': 'application/rpki-ghostbusters', - 'gca': 'application/x-gca-compressed', - 'gdl': 'model/vnd.gdl', - 'geo': 'application/vnd.dynageo', - 'gex': 'application/vnd.geometry-explorer', - 'ggb': 'application/vnd.geogebra.file', - 'ggt': 'application/vnd.geogebra.tool', - 'ghf': 'application/vnd.groove-help', - 'gif': 'image/gif', - 'gim': 'application/vnd.groove-identity-message', - 'glb': 'model/gltf-binary', - 'gltf': 'model/gltf+json', - 'gml': 'application/gml+xml', - 'gmx': 'application/vnd.gmx', - 'gnumeric': 'application/x-gnumeric', - 'gph': 'application/vnd.flographit', - 'gpx': 'application/gpx+xml', - 'gqf': 'application/vnd.grafeq', - 'gqs': 'application/vnd.grafeq', - 'gram': 'application/srgs', - 'gramps': 'application/x-gramps-xml', - 'gre': 'application/vnd.geometry-explorer', - 'grv': 'application/vnd.groove-injector', - 'grxml': 'application/srgs+xml', - 'gsf': 'application/x-font-ghostscript', - 'gtar': 'application/x-gtar', - 'gtm': 'application/vnd.groove-tool-message', - 'gtw': 'model/vnd.gtw', - 'gv': 'text/vnd.graphviz', - 'gxf': 'application/gxf', - 'gxt': 'application/vnd.geonext', - 'h': 'text/x-c', - 'h261': 'video/h261', - 'h263': 'video/h263', - 'h264': 'video/h264', - 'hal': 'application/vnd.hal+xml', - 'hbci': 'application/vnd.hbci', - 'hdf': 'application/x-hdf', - 'heic': 'image/heic', - 'heif': 'image/heif', - 'hh': 'text/x-c', - 'hlp': 'application/winhlp', - 'hpgl': 'application/vnd.hp-hpgl', - 'hpid': 'application/vnd.hp-hpid', - 'hps': 'application/vnd.hp-hps', - 'hqx': 'application/mac-binhex40', - 'htke': 'application/vnd.kenameaapp', - 'htm': 'text/html', - 'html': 'text/html', - 'hvd': 'application/vnd.yamaha.hv-dic', - 'hvp': 'application/vnd.yamaha.hv-voice', - 'hvs': 'application/vnd.yamaha.hv-script', - 'i2g': 'application/vnd.intergeo', - 'icc': 'application/vnd.iccprofile', - 'ice': 'x-conference/x-cooltalk', - 'icm': 'application/vnd.iccprofile', - 'ico': 'image/x-icon', - 'ics': 'text/calendar', - 'ief': 'image/ief', - 'ifb': 'text/calendar', - 'ifm': 'application/vnd.shana.informed.formdata', - 'iges': 'model/iges', - 'igl': 'application/vnd.igloader', - 'igm': 'application/vnd.insors.igm', - 'igs': 'model/iges', - 'igx': 'application/vnd.micrografx.igx', - 'iif': 'application/vnd.shana.informed.interchange', - 'imp': 'application/vnd.accpac.simply.imp', - 'ims': 'application/vnd.ms-ims', - 'in': 'text/plain', - 'ink': 'application/inkml+xml', - 'inkml': 'application/inkml+xml', - 'install': 'application/x-install-instructions', - 'iota': 'application/vnd.astraea-software.iota', - 'ipfix': 'application/ipfix', - 'ipk': 'application/vnd.shana.informed.package', - 'irm': 'application/vnd.ibm.rights-management', - 'irp': 'application/vnd.irepository.package+xml', - 'iso': 'application/x-iso9660-image', - 'itp': 'application/vnd.shana.informed.formtemplate', - 'ivp': 'application/vnd.immervision-ivp', - 'ivu': 'application/vnd.immervision-ivu', - 'jad': 'text/vnd.sun.j2me.app-descriptor', - 'jam': 'application/vnd.jam', - 'jar': 'application/java-archive', - 'java': 'text/x-java-source', - 'jisp': 'application/vnd.jisp', - 'jlt': 'application/vnd.hp-jlyt', - 'jnlp': 'application/x-java-jnlp-file', - 'joda': 'application/vnd.joost.joda-archive', - 'jpe': 'image/jpeg', - 'jpeg': 'image/jpeg', - 'jpg': 'image/jpeg', - 'jpgm': 'video/jpm', - 'jpgv': 'video/jpeg', - 'jpm': 'video/jpm', - 'js': 'text/javascript', - 'json': 'application/json', - 'jsonml': 'application/jsonml+json', - 'kar': 'audio/midi', - 'karbon': 'application/vnd.kde.karbon', - 'kfo': 'application/vnd.kde.kformula', - 'kia': 'application/vnd.kidspiration', - 'kml': 'application/vnd.google-earth.kml+xml', - 'kmz': 'application/vnd.google-earth.kmz', - 'kne': 'application/vnd.kinar', - 'knp': 'application/vnd.kinar', - 'kon': 'application/vnd.kde.kontour', - 'kpr': 'application/vnd.kde.kpresenter', - 'kpt': 'application/vnd.kde.kpresenter', - 'kpxx': 'application/vnd.ds-keypoint', - 'ksp': 'application/vnd.kde.kspread', - 'ktr': 'application/vnd.kahootz', - 'ktx': 'image/ktx', - 'ktz': 'application/vnd.kahootz', - 'kwd': 'application/vnd.kde.kword', - 'kwt': 'application/vnd.kde.kword', - 'lasxml': 'application/vnd.las.las+xml', - 'latex': 'application/x-latex', - 'lbd': 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe': 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les': 'application/vnd.hhe.lesson-player', - 'lha': 'application/x-lzh-compressed', - 'link66': 'application/vnd.route66.link66+xml', - 'list': 'text/plain', - 'list3820': 'application/vnd.ibm.modcap', - 'listafp': 'application/vnd.ibm.modcap', - 'lnk': 'application/x-ms-shortcut', - 'log': 'text/plain', - 'lostxml': 'application/lost+xml', - 'lrf': 'application/octet-stream', - 'lrm': 'application/vnd.ms-lrm', - 'ltf': 'application/vnd.frogans.ltf', - 'lvp': 'audio/vnd.lucent.voice', - 'lwp': 'application/vnd.lotus-wordpro', - 'lzh': 'application/x-lzh-compressed', - 'm13': 'application/x-msmediaview', - 'm14': 'application/x-msmediaview', - 'm1v': 'video/mpeg', - 'm21': 'application/mp21', - 'm2a': 'audio/mpeg', - 'm2v': 'video/mpeg', - 'm3a': 'audio/mpeg', - 'm3u': 'audio/x-mpegurl', - 'm3u8': 'application/vnd.apple.mpegurl', - // Source: https://datatracker.ietf.org/doc/html/rfc4337#section-2 - 'm4a': 'audio/mp4', - 'm4b': 'audio/mp4', - 'm4u': 'video/vnd.mpegurl', - 'm4v': 'video/x-m4v', - 'ma': 'application/mathematica', - 'mads': 'application/mads+xml', - 'mag': 'application/vnd.ecowin.chart', - 'maker': 'application/vnd.framemaker', - 'man': 'text/troff', - 'mar': 'application/octet-stream', - 'mathml': 'application/mathml+xml', - 'mb': 'application/mathematica', - 'mbk': 'application/vnd.mobius.mbk', - 'mbox': 'application/mbox', - 'mc1': 'application/vnd.medcalcdata', - 'mcd': 'application/vnd.mcd', - 'mcurl': 'text/vnd.curl.mcurl', - // https://www.rfc-editor.org/rfc/rfc7763 - 'md': 'text/markdown', - 'markdown': 'text/markdown', - 'mdb': 'application/x-msaccess', - 'mdi': 'image/vnd.ms-modi', - 'me': 'text/troff', - 'mesh': 'model/mesh', - 'meta4': 'application/metalink4+xml', - 'metalink': 'application/metalink+xml', - 'mets': 'application/mets+xml', - 'mfm': 'application/vnd.mfmp', - 'mft': 'application/rpki-manifest', - 'mgp': 'application/vnd.osgeo.mapguide.package', - 'mgz': 'application/vnd.proteus.magazine', - 'mid': 'audio/midi', - 'midi': 'audio/midi', - 'mie': 'application/x-mie', - 'mif': 'application/vnd.mif', - 'mime': 'message/rfc822', - 'mj2': 'video/mj2', - 'mjp2': 'video/mj2', - 'mjs': 'text/javascript', - 'mk3d': 'video/x-matroska', - 'mka': 'audio/x-matroska', - 'mks': 'video/x-matroska', - 'mkv': 'video/x-matroska', - 'mlp': 'application/vnd.dolby.mlp', - 'mmd': 'application/vnd.chipnuts.karaoke-mmd', - 'mmf': 'application/vnd.smaf', - 'mmr': 'image/vnd.fujixerox.edmics-mmr', - 'mng': 'video/x-mng', - 'mny': 'application/x-msmoney', - 'mobi': 'application/x-mobipocket-ebook', - 'mods': 'application/mods+xml', - 'mov': 'video/quicktime', - 'movie': 'video/x-sgi-movie', - 'mp2': 'audio/mpeg', - 'mp21': 'application/mp21', - 'mp2a': 'audio/mpeg', - 'mp3': 'audio/mpeg', - 'mp4': 'video/mp4', - 'mp4a': 'audio/mp4', - 'mp4s': 'application/mp4', - 'mp4v': 'video/mp4', - 'mpc': 'application/vnd.mophun.certificate', - 'mpe': 'video/mpeg', - 'mpeg': 'video/mpeg', - 'mpg': 'video/mpeg', - 'mpg4': 'video/mp4', - 'mpga': 'audio/mpeg', - 'mpkg': 'application/vnd.apple.installer+xml', - 'mpm': 'application/vnd.blueice.multipass', - 'mpn': 'application/vnd.mophun.application', - 'mpp': 'application/vnd.ms-project', - 'mpt': 'application/vnd.ms-project', - 'mpy': 'application/vnd.ibm.minipay', - 'mqy': 'application/vnd.mobius.mqy', - 'mrc': 'application/marc', - 'mrcx': 'application/marcxml+xml', - 'ms': 'text/troff', - 'mscml': 'application/mediaservercontrol+xml', - 'mseed': 'application/vnd.fdsn.mseed', - 'mseq': 'application/vnd.mseq', - 'msf': 'application/vnd.epson.msf', - 'msh': 'model/mesh', - 'msi': 'application/x-msdownload', - 'msl': 'application/vnd.mobius.msl', - 'msty': 'application/vnd.muvee.style', - 'mts': 'model/vnd.mts', - 'mus': 'application/vnd.musician', - 'musicxml': 'application/vnd.recordare.musicxml+xml', - 'mvb': 'application/x-msmediaview', - 'mwf': 'application/vnd.mfer', - 'mxf': 'application/mxf', - 'mxl': 'application/vnd.recordare.musicxml', - 'mxml': 'application/xv+xml', - 'mxs': 'application/vnd.triscape.mxs', - 'mxu': 'video/vnd.mpegurl', - 'n-gage': 'application/vnd.nokia.n-gage.symbian.install', - 'n3': 'text/n3', - 'nb': 'application/mathematica', - 'nbp': 'application/vnd.wolfram.player', - 'nc': 'application/x-netcdf', - 'ncx': 'application/x-dtbncx+xml', - 'nfo': 'text/x-nfo', - 'ngdat': 'application/vnd.nokia.n-gage.data', - 'nitf': 'application/vnd.nitf', - 'nlu': 'application/vnd.neurolanguage.nlu', - 'nml': 'application/vnd.enliven', - 'nnd': 'application/vnd.noblenet-directory', - 'nns': 'application/vnd.noblenet-sealer', - 'nnw': 'application/vnd.noblenet-web', - 'npx': 'image/vnd.net-fpx', - 'nsc': 'application/x-conference', - 'nsf': 'application/vnd.lotus-notes', - 'ntf': 'application/vnd.nitf', - 'nzb': 'application/x-nzb', - 'oa2': 'application/vnd.fujitsu.oasys2', - 'oa3': 'application/vnd.fujitsu.oasys3', - 'oas': 'application/vnd.fujitsu.oasys', - 'obd': 'application/x-msbinder', - 'obj': 'application/x-tgif', - 'oda': 'application/oda', - 'odb': 'application/vnd.oasis.opendocument.database', - 'odc': 'application/vnd.oasis.opendocument.chart', - 'odf': 'application/vnd.oasis.opendocument.formula', - 'odft': 'application/vnd.oasis.opendocument.formula-template', - 'odg': 'application/vnd.oasis.opendocument.graphics', - 'odi': 'application/vnd.oasis.opendocument.image', - 'odm': 'application/vnd.oasis.opendocument.text-master', - 'odp': 'application/vnd.oasis.opendocument.presentation', - 'ods': 'application/vnd.oasis.opendocument.spreadsheet', - 'odt': 'application/vnd.oasis.opendocument.text', - 'oga': 'audio/ogg', - 'ogg': 'audio/ogg', - 'ogv': 'video/ogg', - 'ogx': 'application/ogg', - 'omdoc': 'application/omdoc+xml', - 'onepkg': 'application/onenote', - 'onetmp': 'application/onenote', - 'onetoc': 'application/onenote', - 'onetoc2': 'application/onenote', - 'opf': 'application/oebps-package+xml', - 'opml': 'text/x-opml', - 'oprc': 'application/vnd.palm', - 'org': 'application/vnd.lotus-organizer', - 'osf': 'application/vnd.yamaha.openscoreformat', - 'osfpvg': 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'otc': 'application/vnd.oasis.opendocument.chart-template', - 'otf': 'application/x-font-otf', - 'otg': 'application/vnd.oasis.opendocument.graphics-template', - 'oth': 'application/vnd.oasis.opendocument.text-web', - 'oti': 'application/vnd.oasis.opendocument.image-template', - 'otp': 'application/vnd.oasis.opendocument.presentation-template', - 'ots': 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott': 'application/vnd.oasis.opendocument.text-template', - 'oxps': 'application/oxps', - 'oxt': 'application/vnd.openofficeorg.extension', - 'p': 'text/x-pascal', - 'p10': 'application/pkcs10', - 'p12': 'application/x-pkcs12', - 'p7b': 'application/x-pkcs7-certificates', - 'p7c': 'application/pkcs7-mime', - 'p7m': 'application/pkcs7-mime', - 'p7r': 'application/x-pkcs7-certreqresp', - 'p7s': 'application/pkcs7-signature', - 'p8': 'application/pkcs8', - 'pas': 'text/x-pascal', - 'paw': 'application/vnd.pawaafile', - 'pbd': 'application/vnd.powerbuilder6', - 'pbm': 'image/x-portable-bitmap', - 'pcap': 'application/vnd.tcpdump.pcap', - 'pcf': 'application/x-font-pcf', - 'pcl': 'application/vnd.hp-pcl', - 'pclxl': 'application/vnd.hp-pclxl', - 'pct': 'image/x-pict', - 'pcurl': 'application/vnd.curl.pcurl', - 'pcx': 'image/x-pcx', - 'pdb': 'application/vnd.palm', - 'pdf': 'application/pdf', - 'pfa': 'application/x-font-type1', - 'pfb': 'application/x-font-type1', - 'pfm': 'application/x-font-type1', - 'pfr': 'application/font-tdpfr', - 'pfx': 'application/x-pkcs12', - 'pgm': 'image/x-portable-graymap', - 'pgn': 'application/x-chess-pgn', - 'pgp': 'application/pgp-encrypted', - 'pic': 'image/x-pict', - 'pkg': 'application/octet-stream', - 'pki': 'application/pkixcmp', - 'pkipath': 'application/pkix-pkipath', - 'plb': 'application/vnd.3gpp.pic-bw-large', - 'plc': 'application/vnd.mobius.plc', - 'plf': 'application/vnd.pocketlearn', - 'pls': 'application/pls+xml', - 'pml': 'application/vnd.ctc-posml', - 'png': 'image/png', - 'pnm': 'image/x-portable-anymap', - 'portpkg': 'application/vnd.macports.portpkg', - 'pot': 'application/vnd.ms-powerpoint', - 'potm': 'application/vnd.ms-powerpoint.template.macroenabled.12', - 'potx': - 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppam': 'application/vnd.ms-powerpoint.addin.macroenabled.12', - 'ppd': 'application/vnd.cups-ppd', - 'ppm': 'image/x-portable-pixmap', - 'pps': 'application/vnd.ms-powerpoint', - 'ppsm': 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - 'ppsx': - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt': 'application/vnd.ms-powerpoint', - 'pptm': 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - 'pptx': - 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa': 'application/vnd.palm', - 'prc': 'application/x-mobipocket-ebook', - 'pre': 'application/vnd.lotus-freelance', - 'prf': 'application/pics-rules', - 'ps': 'application/postscript', - 'psb': 'application/vnd.3gpp.pic-bw-small', - 'psd': 'image/vnd.adobe.photoshop', - 'psf': 'application/x-font-linux-psf', - 'pskcxml': 'application/pskc+xml', - 'ptid': 'application/vnd.pvi.ptid1', - 'pub': 'application/x-mspublisher', - 'pvb': 'application/vnd.3gpp.pic-bw-var', - 'pwn': 'application/vnd.3m.post-it-notes', - 'pya': 'audio/vnd.ms-playready.media.pya', - 'pyv': 'video/vnd.ms-playready.media.pyv', - 'qam': 'application/vnd.epson.quickanime', - 'qbo': 'application/vnd.intu.qbo', - 'qfx': 'application/vnd.intu.qfx', - 'qps': 'application/vnd.publishare-delta-tree', - 'qt': 'video/quicktime', - 'qwd': 'application/vnd.quark.quarkxpress', - 'qwt': 'application/vnd.quark.quarkxpress', - 'qxb': 'application/vnd.quark.quarkxpress', - 'qxd': 'application/vnd.quark.quarkxpress', - 'qxl': 'application/vnd.quark.quarkxpress', - 'qxt': 'application/vnd.quark.quarkxpress', - 'ra': 'audio/x-pn-realaudio', - 'ram': 'audio/x-pn-realaudio', - 'rar': 'application/x-rar-compressed', - 'ras': 'image/x-cmu-raster', - 'rcprofile': 'application/vnd.ipunplugged.rcprofile', - 'rdf': 'application/rdf+xml', - 'rdz': 'application/vnd.data-vision.rdz', - 'rep': 'application/vnd.businessobjects', - 'res': 'application/x-dtbresource+xml', - 'rgb': 'image/x-rgb', - 'rif': 'application/reginfo+xml', - 'rip': 'audio/vnd.rip', - 'ris': 'application/x-research-info-systems', - 'rl': 'application/resource-lists+xml', - 'rlc': 'image/vnd.fujixerox.edmics-rlc', - 'rld': 'application/resource-lists-diff+xml', - 'rm': 'application/vnd.rn-realmedia', - 'rmi': 'audio/midi', - 'rmp': 'audio/x-pn-realaudio-plugin', - 'rms': 'application/vnd.jcp.javame.midlet-rms', - 'rmvb': 'application/vnd.rn-realmedia-vbr', - 'rnc': 'application/relax-ng-compact-syntax', - 'roa': 'application/rpki-roa', - 'roff': 'text/troff', - 'rp9': 'application/vnd.cloanto.rp9', - 'rpss': 'application/vnd.nokia.radio-presets', - 'rpst': 'application/vnd.nokia.radio-preset', - 'rq': 'application/sparql-query', - 'rs': 'application/rls-services+xml', - 'rsd': 'application/rsd+xml', - 'rss': 'application/rss+xml', - 'rtf': 'application/rtf', - 'rtx': 'text/richtext', - 's': 'text/x-asm', - 's3m': 'audio/s3m', - 'saf': 'application/vnd.yamaha.smaf-audio', - 'sbml': 'application/sbml+xml', - 'sc': 'application/vnd.ibm.secure-container', - 'scd': 'application/x-msschedule', - 'scm': 'application/vnd.lotus-screencam', - 'scq': 'application/scvp-cv-request', - 'scs': 'application/scvp-cv-response', - 'scurl': 'text/vnd.curl.scurl', - 'sda': 'application/vnd.stardivision.draw', - 'sdc': 'application/vnd.stardivision.calc', - 'sdd': 'application/vnd.stardivision.impress', - 'sdkd': 'application/vnd.solent.sdkm+xml', - 'sdkm': 'application/vnd.solent.sdkm+xml', - 'sdp': 'application/sdp', - 'sdw': 'application/vnd.stardivision.writer', - 'see': 'application/vnd.seemail', - 'seed': 'application/vnd.fdsn.seed', - 'sema': 'application/vnd.sema', - 'semd': 'application/vnd.semd', - 'semf': 'application/vnd.semf', - 'ser': 'application/java-serialized-object', - 'setpay': 'application/set-payment-initiation', - 'setreg': 'application/set-registration-initiation', - 'sfd-hdstx': 'application/vnd.hydrostatix.sof-data', - 'sfs': 'application/vnd.spotfire.sfs', - 'sfv': 'text/x-sfv', - 'sgi': 'image/sgi', - 'sgl': 'application/vnd.stardivision.writer-global', - 'sgm': 'text/sgml', - 'sgml': 'text/sgml', - 'sh': 'application/x-sh', - 'shar': 'application/x-shar', - 'shf': 'application/shf+xml', - 'sid': 'image/x-mrsid-image', - 'sig': 'application/pgp-signature', - 'sil': 'audio/silk', - 'silo': 'model/mesh', - 'sis': 'application/vnd.symbian.install', - 'sisx': 'application/vnd.symbian.install', - 'sit': 'application/x-stuffit', - 'sitx': 'application/x-stuffitx', - 'skd': 'application/vnd.koan', - 'skm': 'application/vnd.koan', - 'skp': 'application/vnd.koan', - 'skt': 'application/vnd.koan', - 'sldm': 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx': 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slt': 'application/vnd.epson.salt', - 'sm': 'application/vnd.stepmania.stepchart', - 'smf': 'application/vnd.stardivision.math', - 'smi': 'application/smil+xml', - 'smil': 'application/smil+xml', - 'smv': 'video/x-smv', - 'smzip': 'application/vnd.stepmania.package', - 'snd': 'audio/basic', - 'snf': 'application/x-font-snf', - 'so': 'application/octet-stream', - 'spc': 'application/x-pkcs7-certificates', - 'spf': 'application/vnd.yamaha.smaf-phrase', - 'spl': 'application/x-futuresplash', - 'spot': 'text/vnd.in3d.spot', - 'spp': 'application/scvp-vp-response', - 'spq': 'application/scvp-vp-request', - 'spx': 'audio/ogg', - 'sql': 'application/x-sql', - 'src': 'application/x-wais-source', - 'srt': 'application/x-subrip', - 'sru': 'application/sru+xml', - 'srx': 'application/sparql-results+xml', - 'ssdl': 'application/ssdl+xml', - 'sse': 'application/vnd.kodak-descriptor', - 'ssf': 'application/vnd.epson.ssf', - 'ssml': 'application/ssml+xml', - 'st': 'application/vnd.sailingtracker.track', - 'stc': 'application/vnd.sun.xml.calc.template', - 'std': 'application/vnd.sun.xml.draw.template', - 'stf': 'application/vnd.wt.stf', - 'sti': 'application/vnd.sun.xml.impress.template', - 'stk': 'application/hyperstudio', - 'stl': 'application/vnd.ms-pki.stl', - 'str': 'application/vnd.pg.format', - 'stw': 'application/vnd.sun.xml.writer.template', - 'sub': 'text/vnd.dvb.subtitle', - 'sus': 'application/vnd.sus-calendar', - 'susp': 'application/vnd.sus-calendar', - 'sv4cpio': 'application/x-sv4cpio', - 'sv4crc': 'application/x-sv4crc', - 'svc': 'application/vnd.dvb.service', - 'svd': 'application/vnd.svd', - 'svg': 'image/svg+xml', - 'svgz': 'image/svg+xml', - 'swa': 'application/x-director', - 'swf': 'application/x-shockwave-flash', - 'swi': 'application/vnd.aristanetworks.swi', - 'sxc': 'application/vnd.sun.xml.calc', - 'sxd': 'application/vnd.sun.xml.draw', - 'sxg': 'application/vnd.sun.xml.writer.global', - 'sxi': 'application/vnd.sun.xml.impress', - 'sxm': 'application/vnd.sun.xml.math', - 'sxw': 'application/vnd.sun.xml.writer', - 't': 'text/troff', - 't3': 'application/x-t3vm-image', - 'taglet': 'application/vnd.mynfc', - 'tao': 'application/vnd.tao.intent-module-archive', - 'tar': 'application/x-tar', - 'tcap': 'application/vnd.3gpp2.tcap', - 'tcl': 'application/x-tcl', - 'teacher': 'application/vnd.smart.teacher', - 'tei': 'application/tei+xml', - 'teicorpus': 'application/tei+xml', - 'tex': 'application/x-tex', - 'texi': 'application/x-texinfo', - 'texinfo': 'application/x-texinfo', - 'text': 'text/plain', - 'tfi': 'application/thraud+xml', - 'tfm': 'application/x-tex-tfm', - 'tga': 'image/x-tga', - 'thmx': 'application/vnd.ms-officetheme', - 'tif': 'image/tiff', - 'tiff': 'image/tiff', - 'tmo': 'application/vnd.tmobile-livetv', - // Source: https://toml.io/en/v1.0.0#mime-type - 'toml': 'application/toml', - 'torrent': 'application/x-bittorrent', - 'tpl': 'application/vnd.groove-tool-template', - 'tpt': 'application/vnd.trid.tpt', - 'tr': 'text/troff', - 'tra': 'application/vnd.trueapp', - 'trm': 'application/x-msterminal', - 'tsd': 'application/timestamped-data', - 'tsv': 'text/tab-separated-values', - 'ttc': 'application/x-font-ttf', - 'ttf': 'application/x-font-ttf', - 'ttl': 'text/turtle', - 'twd': 'application/vnd.simtech-mindmapper', - 'twds': 'application/vnd.simtech-mindmapper', - 'txd': 'application/vnd.genomatix.tuxedo', - 'txf': 'application/vnd.mobius.txf', - 'txt': 'text/plain', - 'u32': 'application/x-authorware-bin', - 'udeb': 'application/x-debian-package', - 'ufd': 'application/vnd.ufdl', - 'ufdl': 'application/vnd.ufdl', - 'ulx': 'application/x-glulx', - 'umj': 'application/vnd.umajin', - 'unityweb': 'application/vnd.unity', - 'uoml': 'application/vnd.uoml+xml', - 'uri': 'text/uri-list', - 'uris': 'text/uri-list', - 'urls': 'text/uri-list', - 'ustar': 'application/x-ustar', - 'utz': 'application/vnd.uiq.theme', - 'uu': 'text/x-uuencode', - 'uva': 'audio/vnd.dece.audio', - 'uvd': 'application/vnd.dece.data', - 'uvf': 'application/vnd.dece.data', - 'uvg': 'image/vnd.dece.graphic', - 'uvh': 'video/vnd.dece.hd', - 'uvi': 'image/vnd.dece.graphic', - 'uvm': 'video/vnd.dece.mobile', - 'uvp': 'video/vnd.dece.pd', - 'uvs': 'video/vnd.dece.sd', - 'uvt': 'application/vnd.dece.ttml+xml', - 'uvu': 'video/vnd.uvvu.mp4', - 'uvv': 'video/vnd.dece.video', - 'uvva': 'audio/vnd.dece.audio', - 'uvvd': 'application/vnd.dece.data', - 'uvvf': 'application/vnd.dece.data', - 'uvvg': 'image/vnd.dece.graphic', - 'uvvh': 'video/vnd.dece.hd', - 'uvvi': 'image/vnd.dece.graphic', - 'uvvm': 'video/vnd.dece.mobile', - 'uvvp': 'video/vnd.dece.pd', - 'uvvs': 'video/vnd.dece.sd', - 'uvvt': 'application/vnd.dece.ttml+xml', - 'uvvu': 'video/vnd.uvvu.mp4', - 'uvvv': 'video/vnd.dece.video', - 'uvvx': 'application/vnd.dece.unspecified', - 'uvvz': 'application/vnd.dece.zip', - 'uvx': 'application/vnd.dece.unspecified', - 'uvz': 'application/vnd.dece.zip', - 'vcard': 'text/vcard', - 'vcd': 'application/x-cdlink', - 'vcf': 'text/x-vcard', - 'vcg': 'application/vnd.groove-vcard', - 'vcs': 'text/x-vcalendar', - 'vcx': 'application/vnd.vcx', - 'vis': 'application/vnd.visionary', - 'viv': 'video/vnd.vivo', - 'vob': 'video/x-ms-vob', - 'vor': 'application/vnd.stardivision.writer', - 'vox': 'application/x-authorware-bin', - 'vrml': 'model/vrml', - 'vsd': 'application/vnd.visio', - 'vsf': 'application/vnd.vsf', - 'vss': 'application/vnd.visio', - 'vst': 'application/vnd.visio', - 'vsw': 'application/vnd.visio', - 'vtu': 'model/vnd.vtu', - 'vxml': 'application/voicexml+xml', - 'w3d': 'application/x-director', - 'wad': 'application/x-doom', - 'wasm': 'application/wasm', - 'wav': 'audio/x-wav', - 'wax': 'audio/x-ms-wax', - 'wbmp': 'image/vnd.wap.wbmp', - 'wbs': 'application/vnd.criticaltools.wbs+xml', - 'wbxml': 'application/vnd.wap.wbxml', - 'wcm': 'application/vnd.ms-works', - 'wdb': 'application/vnd.ms-works', - 'wdp': 'image/vnd.ms-photo', - 'weba': 'audio/webm', - 'webm': 'video/webm', - // Source: https://w3c.github.io/manifest/#media-type-registration - 'webmanifest': 'application/manifest+json', - 'webp': 'image/webp', - 'wg': 'application/vnd.pmi.widget', - 'wgt': 'application/widget', - 'wks': 'application/vnd.ms-works', - 'wm': 'video/x-ms-wm', - 'wma': 'audio/x-ms-wma', - 'wmd': 'application/x-ms-wmd', - 'wmf': 'application/x-msmetafile', - 'wml': 'text/vnd.wap.wml', - 'wmlc': 'application/vnd.wap.wmlc', - 'wmls': 'text/vnd.wap.wmlscript', - 'wmlsc': 'application/vnd.wap.wmlscriptc', - 'wmv': 'video/x-ms-wmv', - 'wmx': 'video/x-ms-wmx', - 'wmz': 'application/x-ms-wmz', - 'woff': 'application/x-font-woff', - 'woff2': 'font/woff2', - 'wpd': 'application/vnd.wordperfect', - 'wpl': 'application/vnd.ms-wpl', - 'wps': 'application/vnd.ms-works', - 'wqd': 'application/vnd.wqd', - 'wri': 'application/x-mswrite', - 'wrl': 'model/vrml', - 'wsdl': 'application/wsdl+xml', - 'wspolicy': 'application/wspolicy+xml', - 'wtb': 'application/vnd.webturbo', - 'wvx': 'video/x-ms-wvx', - 'x32': 'application/x-authorware-bin', - 'x3d': 'model/x3d+xml', - 'x3db': 'model/x3d+binary', - 'x3dbz': 'model/x3d+binary', - 'x3dv': 'model/x3d+vrml', - 'x3dvz': 'model/x3d+vrml', - 'x3dz': 'model/x3d+xml', - 'xaml': 'application/xaml+xml', - 'xap': 'application/x-silverlight-app', - 'xar': 'application/vnd.xara', - 'xbap': 'application/x-ms-xbap', - 'xbd': 'application/vnd.fujixerox.docuworks.binder', - 'xbm': 'image/x-xbitmap', - 'xdf': 'application/xcap-diff+xml', - 'xdm': 'application/vnd.syncml.dm+xml', - 'xdp': 'application/vnd.adobe.xdp+xml', - 'xdssc': 'application/dssc+xml', - 'xdw': 'application/vnd.fujixerox.docuworks', - 'xenc': 'application/xenc+xml', - 'xer': 'application/patch-ops-error+xml', - 'xfdf': 'application/vnd.adobe.xfdf', - 'xfdl': 'application/vnd.xfdl', - 'xht': 'application/xhtml+xml', - 'xhtml': 'application/xhtml+xml', - 'xhvml': 'application/xv+xml', - 'xif': 'image/vnd.xiff', - 'xla': 'application/vnd.ms-excel', - 'xlam': 'application/vnd.ms-excel.addin.macroenabled.12', - 'xlc': 'application/vnd.ms-excel', - 'xlf': 'application/x-xliff+xml', - 'xlm': 'application/vnd.ms-excel', - 'xls': 'application/vnd.ms-excel', - 'xlsb': 'application/vnd.ms-excel.sheet.binary.macroenabled.12', - 'xlsm': 'application/vnd.ms-excel.sheet.macroenabled.12', - 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt': 'application/vnd.ms-excel', - 'xltm': 'application/vnd.ms-excel.template.macroenabled.12', - 'xltx': - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw': 'application/vnd.ms-excel', - 'xm': 'audio/xm', - 'xml': 'application/xml', - 'xo': 'application/vnd.olpc-sugar', - 'xop': 'application/xop+xml', - 'xpi': 'application/x-xpinstall', - 'xpl': 'application/xproc+xml', - 'xpm': 'image/x-xpixmap', - 'xpr': 'application/vnd.is-xpr', - 'xps': 'application/vnd.ms-xpsdocument', - 'xpw': 'application/vnd.intercon.formnet', - 'xpx': 'application/vnd.intercon.formnet', - 'xsl': 'application/xml', - 'xslt': 'application/xslt+xml', - 'xsm': 'application/vnd.syncml+xml', - 'xspf': 'application/xspf+xml', - 'xul': 'application/vnd.mozilla.xul+xml', - 'xvm': 'application/xv+xml', - 'xvml': 'application/xv+xml', - 'xwd': 'image/x-xwindowdump', - 'xyz': 'chemical/x-xyz', - 'xz': 'application/x-xz', - 'yang': 'application/yang', - 'yin': 'application/yin+xml', - 'z1': 'application/x-zmachine', - 'z2': 'application/x-zmachine', - 'z3': 'application/x-zmachine', - 'z4': 'application/x-zmachine', - 'z5': 'application/x-zmachine', - 'z6': 'application/x-zmachine', - 'z7': 'application/x-zmachine', - 'z8': 'application/x-zmachine', - 'zaz': 'application/vnd.zzazz.deck+xml', - 'zip': 'application/zip', - 'zir': 'application/vnd.zul', - 'zirz': 'application/vnd.zul', - 'zmm': 'application/vnd.handheld-entertainment+xml', -}; +import 'media_types.g.dart'; + +const Map defaultExtensionMap = extensionToMedia; diff --git a/pkgs/mime/lib/src/extension.dart b/pkgs/mime/lib/src/extension.dart index 293449a0e0..08dd713c45 100644 --- a/pkgs/mime/lib/src/extension.dart +++ b/pkgs/mime/lib/src/extension.dart @@ -2,54 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'default_extension_map.dart'; - -/// Default extension for recognized MIME types. -/// -/// Is the inverse of [defaultExtensionMap], and where that -/// map has multiple extensions which map to the same -/// MIME type, this map maps that MIME type to a *default* -/// extension. -/// -/// Used by [extensionFromMime]. -final Map _defaultMimeTypeMap = { - for (var entry in defaultExtensionMap.entries) entry.value: entry.key, - 'application/msword': 'doc', - 'application/vnd.ms-excel': 'xls', - 'application/vnd.ms-powerpoint': 'ppt', - 'application/x-debian-package': 'deb', - 'application/xhtml+xml': 'xhtml', - 'application/xml': 'xml', - 'audio/x-aiff': 'aif', - 'audio/midi': 'mid', - 'audio/mp4': 'm4a', - 'audio/ogg': 'ogg', - 'image/jpeg': 'jpg', - 'image/tiff': 'tif', - 'image/svg+xml': 'svg', - 'model/vrml': 'vrml', - 'text/calendar': 'ics', - 'text/html': 'html', - 'text/javascript': 'js', - 'text/markdown': 'md', - 'text/plain': 'txt', - 'text/sgml': 'sgml', - 'text/x-asm': 'asm', - 'text/x-c': 'c', - 'text/x-pascal': 'pas', - 'video/mp4': 'mp4', - 'video/mpeg': 'mpg', - 'video/quicktime': 'mov', - 'video/x-matroska': 'mkv', -}; +import 'media_types.g.dart'; /// The default file extension for a given MIME type. /// -/// If [mimeType] has multiple associated extensions, -/// the returned string is one of those, chosen as the default -/// extension for that MIME type. +/// If [mimeType] has multiple associated extensions, the returned string is one +/// of those, chosen as the default extension for that MIME type. /// -/// Returns `null` if [mimeType] is not a recognized and -/// supported MIME type. -String? extensionFromMime(String mimeType) => - _defaultMimeTypeMap[mimeType.toLowerCase()]; +/// Returns `null` if [mimeType] is not a recognized and supported MIME type. +String? extensionFromMime(String mimeType) { + final exts = mediaToExtensions[mimeType.toLowerCase()]; + return exts?.first; +} diff --git a/pkgs/mime/lib/src/media_types.g.dart b/pkgs/mime/lib/src/media_types.g.dart new file mode 100644 index 0000000000..8ffeaa5753 --- /dev/null +++ b/pkgs/mime/lib/src/media_types.g.dart @@ -0,0 +1,1846 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Generated file - do not edit. + +/// A map of mime types to file extensions for that type. +/// +/// If a mime type has multiple file extenions, the first in the list will be +/// returned as the preferred file extension for that type. +const Map> mediaToExtensions = { + 'application/andrew-inset': ['ez'], + 'application/applixware': ['aw'], + 'application/atom+xml': ['atom'], + 'application/atomcat+xml': ['atomcat'], + 'application/atomsvc+xml': ['atomsvc'], + 'application/ccxml+xml': ['ccxml'], + 'application/cdmi-capability': ['cdmia'], + 'application/cdmi-container': ['cdmic'], + 'application/cdmi-domain': ['cdmid'], + 'application/cdmi-object': ['cdmio'], + 'application/cdmi-queue': ['cdmiq'], + 'application/cu-seeme': ['cu'], + 'application/davmount+xml': ['davmount'], + 'application/dicom': ['dcm'], + 'application/docbook+xml': ['dbk'], + 'application/dssc+der': ['dssc'], + 'application/dssc+xml': ['xdssc'], + 'application/ecmascript': ['ecma'], + 'application/emma+xml': ['emma'], + 'application/epub+zip': ['epub'], + 'application/exi': ['exi'], + 'application/font-tdpfr': ['pfr'], + 'application/gml+xml': ['gml'], + 'application/gpx+xml': ['gpx'], + 'application/gxf': ['gxf'], + 'application/hyperstudio': ['stk'], + 'application/inkml+xml': ['ink', 'inkml'], + 'application/ipfix': ['ipfix'], + 'application/java-archive': ['jar'], + 'application/java-serialized-object': ['ser'], + 'application/java-vm': ['class'], + 'application/json': ['json'], + 'application/jsonml+json': ['jsonml'], + 'application/lost+xml': ['lostxml'], + 'application/mac-binhex40': ['hqx'], + 'application/mac-compactpro': ['cpt'], + 'application/mads+xml': ['mads'], + 'application/manifest+json': ['webmanifest'], + 'application/marc': ['mrc'], + 'application/marcxml+xml': ['mrcx'], + 'application/mathematica': ['nb', 'ma', 'mb'], + 'application/mathml+xml': ['mathml'], + 'application/mbox': ['mbox'], + 'application/mediaservercontrol+xml': ['mscml'], + 'application/metalink+xml': ['metalink'], + 'application/metalink4+xml': ['meta4'], + 'application/mets+xml': ['mets'], + 'application/mods+xml': ['mods'], + 'application/mp21': ['mp21', 'm21'], + 'application/mp4': ['mp4s'], + 'application/msword': ['doc', 'dot'], + 'application/mxf': ['mxf'], + 'application/octet-stream': [ + 'bin', + 'bpk', + 'deploy', + 'dist', + 'distz', + 'dms', + 'dump', + 'elc', + 'lrf', + 'mar', + 'pkg', + 'so' + ], + 'application/oda': ['oda'], + 'application/oebps-package+xml': ['opf'], + 'application/ogg': ['ogx'], + 'application/omdoc+xml': ['omdoc'], + 'application/onenote': ['onetoc', 'onepkg', 'onetmp', 'onetoc2'], + 'application/oxps': ['oxps'], + 'application/patch-ops-error+xml': ['xer'], + 'application/pdf': ['pdf'], + 'application/pgp-encrypted': ['pgp'], + 'application/pgp-signature': ['asc', 'sig'], + 'application/pics-rules': ['prf'], + 'application/pkcs10': ['p10'], + 'application/pkcs7-mime': ['p7m', 'p7c'], + 'application/pkcs7-signature': ['p7s'], + 'application/pkcs8': ['p8'], + 'application/pkix-attr-cert': ['ac'], + 'application/pkix-cert': ['cer'], + 'application/pkix-crl': ['crl'], + 'application/pkix-pkipath': ['pkipath'], + 'application/pkixcmp': ['pki'], + 'application/pls+xml': ['pls'], + 'application/postscript': ['ps', 'ai', 'eps'], + 'application/prs.cww': ['cww'], + 'application/pskc+xml': ['pskcxml'], + 'application/rdf+xml': ['rdf'], + 'application/reginfo+xml': ['rif'], + 'application/relax-ng-compact-syntax': ['rnc'], + 'application/resource-lists+xml': ['rl'], + 'application/resource-lists-diff+xml': ['rld'], + 'application/rls-services+xml': ['rs'], + 'application/rpki-ghostbusters': ['gbr'], + 'application/rpki-manifest': ['mft'], + 'application/rpki-roa': ['roa'], + 'application/rsd+xml': ['rsd'], + 'application/rss+xml': ['rss'], + 'application/rtf': ['rtf'], + 'application/sbml+xml': ['sbml'], + 'application/scvp-cv-request': ['scq'], + 'application/scvp-cv-response': ['scs'], + 'application/scvp-vp-request': ['spq'], + 'application/scvp-vp-response': ['spp'], + 'application/sdp': ['sdp'], + 'application/set-payment-initiation': ['setpay'], + 'application/set-registration-initiation': ['setreg'], + 'application/shf+xml': ['shf'], + 'application/smil+xml': ['smil', 'smi'], + 'application/sparql-query': ['rq'], + 'application/sparql-results+xml': ['srx'], + 'application/srgs': ['gram'], + 'application/srgs+xml': ['grxml'], + 'application/sru+xml': ['sru'], + 'application/ssdl+xml': ['ssdl'], + 'application/ssml+xml': ['ssml'], + 'application/tei+xml': ['tei', 'teicorpus'], + 'application/thraud+xml': ['tfi'], + 'application/timestamped-data': ['tsd'], + 'application/toml': ['toml'], + 'application/vnd.3gpp.pic-bw-large': ['plb'], + 'application/vnd.3gpp.pic-bw-small': ['psb'], + 'application/vnd.3gpp.pic-bw-var': ['pvb'], + 'application/vnd.3gpp2.tcap': ['tcap'], + 'application/vnd.3m.post-it-notes': ['pwn'], + 'application/vnd.accpac.simply.aso': ['aso'], + 'application/vnd.accpac.simply.imp': ['imp'], + 'application/vnd.acucobol': ['acu'], + 'application/vnd.acucorp': ['atc', 'acutc'], + 'application/vnd.adobe.air-application-installer-package+zip': ['air'], + 'application/vnd.adobe.formscentral.fcdt': ['fcdt'], + 'application/vnd.adobe.fxp': ['fxp', 'fxpl'], + 'application/vnd.adobe.xdp+xml': ['xdp'], + 'application/vnd.adobe.xfdf': ['xfdf'], + 'application/vnd.ahead.space': ['ahead'], + 'application/vnd.airzip.filesecure.azf': ['azf'], + 'application/vnd.airzip.filesecure.azs': ['azs'], + 'application/vnd.amazon.ebook': ['azw'], + 'application/vnd.americandynamics.acc': ['acc'], + 'application/vnd.amiga.ami': ['ami'], + 'application/vnd.android.package-archive': ['apk'], + 'application/vnd.anser-web-certificate-issue-initiation': ['cii'], + 'application/vnd.anser-web-funds-transfer-initiation': ['fti'], + 'application/vnd.antix.game-component': ['atx'], + 'application/vnd.apple.installer+xml': ['mpkg'], + 'application/vnd.apple.mpegurl': ['m3u8'], + 'application/vnd.aristanetworks.swi': ['swi'], + 'application/vnd.astraea-software.iota': ['iota'], + 'application/vnd.audiograph': ['aep'], + 'application/vnd.blueice.multipass': ['mpm'], + 'application/vnd.bmi': ['bmi'], + 'application/vnd.businessobjects': ['rep'], + 'application/vnd.chemdraw+xml': ['cdxml'], + 'application/vnd.chipnuts.karaoke-mmd': ['mmd'], + 'application/vnd.cinderella': ['cdy'], + 'application/vnd.claymore': ['cla'], + 'application/vnd.cloanto.rp9': ['rp9'], + 'application/vnd.clonk.c4group': ['c4g', 'c4d', 'c4f', 'c4p', 'c4u'], + 'application/vnd.cluetrust.cartomobile-config': ['c11amc'], + 'application/vnd.cluetrust.cartomobile-config-pkg': ['c11amz'], + 'application/vnd.commonspace': ['csp'], + 'application/vnd.contact.cmsg': ['cdbcmsg'], + 'application/vnd.cosmocaller': ['cmc'], + 'application/vnd.crick.clicker': ['clkx'], + 'application/vnd.crick.clicker.keyboard': ['clkk'], + 'application/vnd.crick.clicker.palette': ['clkp'], + 'application/vnd.crick.clicker.template': ['clkt'], + 'application/vnd.crick.clicker.wordbank': ['clkw'], + 'application/vnd.criticaltools.wbs+xml': ['wbs'], + 'application/vnd.ctc-posml': ['pml'], + 'application/vnd.cups-ppd': ['ppd'], + 'application/vnd.curl.car': ['car'], + 'application/vnd.curl.pcurl': ['pcurl'], + 'application/vnd.data-vision.rdz': ['rdz'], + 'application/vnd.dece.data': ['uvf', 'uvd', 'uvvd', 'uvvf'], + 'application/vnd.dece.ttml+xml': ['uvt', 'uvvt'], + 'application/vnd.dece.unspecified': ['uvx', 'uvvx'], + 'application/vnd.dece.zip': ['uvz', 'uvvz'], + 'application/vnd.denovo.fcselayout-link': ['fe_launch'], + 'application/vnd.dna': ['dna'], + 'application/vnd.dolby.mlp': ['mlp'], + 'application/vnd.dpgraph': ['dpg'], + 'application/vnd.dreamfactory': ['dfac'], + 'application/vnd.ds-keypoint': ['kpxx'], + 'application/vnd.dvb.ait': ['ait'], + 'application/vnd.dvb.service': ['svc'], + 'application/vnd.dynageo': ['geo'], + 'application/vnd.ecowin.chart': ['mag'], + 'application/vnd.enliven': ['nml'], + 'application/vnd.epson.esf': ['esf'], + 'application/vnd.epson.msf': ['msf'], + 'application/vnd.epson.quickanime': ['qam'], + 'application/vnd.epson.salt': ['slt'], + 'application/vnd.epson.ssf': ['ssf'], + 'application/vnd.eszigno3+xml': ['es3', 'et3'], + 'application/vnd.ezpix-album': ['ez2'], + 'application/vnd.ezpix-package': ['ez3'], + 'application/vnd.fdf': ['fdf'], + 'application/vnd.fdsn.mseed': ['mseed'], + 'application/vnd.fdsn.seed': ['seed', 'dataless'], + 'application/vnd.flographit': ['gph'], + 'application/vnd.fluxtime.clip': ['ftc'], + 'application/vnd.framemaker': ['fm', 'book', 'frame', 'maker'], + 'application/vnd.frogans.fnc': ['fnc'], + 'application/vnd.frogans.ltf': ['ltf'], + 'application/vnd.fsc.weblaunch': ['fsc'], + 'application/vnd.fujitsu.oasys': ['oas'], + 'application/vnd.fujitsu.oasys2': ['oa2'], + 'application/vnd.fujitsu.oasys3': ['oa3'], + 'application/vnd.fujitsu.oasysgp': ['fg5'], + 'application/vnd.fujitsu.oasysprs': ['bh2'], + 'application/vnd.fujixerox.ddd': ['ddd'], + 'application/vnd.fujixerox.docuworks': ['xdw'], + 'application/vnd.fujixerox.docuworks.binder': ['xbd'], + 'application/vnd.fuzzysheet': ['fzs'], + 'application/vnd.genomatix.tuxedo': ['txd'], + 'application/vnd.geogebra.file': ['ggb'], + 'application/vnd.geogebra.slides': ['ggs'], + 'application/vnd.geogebra.tool': ['ggt'], + 'application/vnd.geometry-explorer': ['gex', 'gre'], + 'application/vnd.geonext': ['gxt'], + 'application/vnd.geoplan': ['g2w'], + 'application/vnd.geospace': ['g3w'], + 'application/vnd.gmx': ['gmx'], + 'application/vnd.google-earth.kml+xml': ['kml'], + 'application/vnd.google-earth.kmz': ['kmz'], + 'application/vnd.grafeq': ['gqf', 'gqs'], + 'application/vnd.groove-account': ['gac'], + 'application/vnd.groove-help': ['ghf'], + 'application/vnd.groove-identity-message': ['gim'], + 'application/vnd.groove-injector': ['grv'], + 'application/vnd.groove-tool-message': ['gtm'], + 'application/vnd.groove-tool-template': ['tpl'], + 'application/vnd.groove-vcard': ['vcg'], + 'application/vnd.hal+xml': ['hal'], + 'application/vnd.handheld-entertainment+xml': ['zmm'], + 'application/vnd.hbci': ['hbci'], + 'application/vnd.hhe.lesson-player': ['les'], + 'application/vnd.hp-hpgl': ['hpgl'], + 'application/vnd.hp-hpid': ['hpid'], + 'application/vnd.hp-hps': ['hps'], + 'application/vnd.hp-jlyt': ['jlt'], + 'application/vnd.hp-pcl': ['pcl'], + 'application/vnd.hp-pclxl': ['pclxl'], + 'application/vnd.hydrostatix.sof-data': ['sfd-hdstx'], + 'application/vnd.ibm.minipay': ['mpy'], + 'application/vnd.ibm.modcap': ['afp', 'list3820', 'listafp'], + 'application/vnd.ibm.rights-management': ['irm'], + 'application/vnd.ibm.secure-container': ['sc'], + 'application/vnd.iccprofile': ['icc', 'icm'], + 'application/vnd.igloader': ['igl'], + 'application/vnd.immervision-ivp': ['ivp'], + 'application/vnd.immervision-ivu': ['ivu'], + 'application/vnd.insors.igm': ['igm'], + 'application/vnd.intercon.formnet': ['xpw', 'xpx'], + 'application/vnd.intergeo': ['i2g'], + 'application/vnd.intu.qbo': ['qbo'], + 'application/vnd.intu.qfx': ['qfx'], + 'application/vnd.ipunplugged.rcprofile': ['rcprofile'], + 'application/vnd.irepository.package+xml': ['irp'], + 'application/vnd.is-xpr': ['xpr'], + 'application/vnd.isac.fcs': ['fcs'], + 'application/vnd.jam': ['jam'], + 'application/vnd.jcp.javame.midlet-rms': ['rms'], + 'application/vnd.jisp': ['jisp'], + 'application/vnd.joost.joda-archive': ['joda'], + 'application/vnd.kahootz': ['ktz', 'ktr'], + 'application/vnd.kde.karbon': ['karbon'], + 'application/vnd.kde.kchart': ['chrt'], + 'application/vnd.kde.kformula': ['kfo'], + 'application/vnd.kde.kivio': ['flw'], + 'application/vnd.kde.kontour': ['kon'], + 'application/vnd.kde.kpresenter': ['kpr', 'kpt'], + 'application/vnd.kde.kspread': ['ksp'], + 'application/vnd.kde.kword': ['kwd', 'kwt'], + 'application/vnd.kenameaapp': ['htke'], + 'application/vnd.kidspiration': ['kia'], + 'application/vnd.kinar': ['kne', 'knp'], + 'application/vnd.koan': ['skp', 'skd', 'skm', 'skt'], + 'application/vnd.kodak-descriptor': ['sse'], + 'application/vnd.las.las+xml': ['lasxml'], + 'application/vnd.llamagraphics.life-balance.desktop': ['lbd'], + 'application/vnd.llamagraphics.life-balance.exchange+xml': ['lbe'], + 'application/vnd.lotus-1-2-3': ['123'], + 'application/vnd.lotus-approach': ['apr'], + 'application/vnd.lotus-freelance': ['pre'], + 'application/vnd.lotus-notes': ['nsf'], + 'application/vnd.lotus-organizer': ['org'], + 'application/vnd.lotus-screencam': ['scm'], + 'application/vnd.lotus-wordpro': ['lwp'], + 'application/vnd.macports.portpkg': ['portpkg'], + 'application/vnd.mcd': ['mcd'], + 'application/vnd.medcalcdata': ['mc1'], + 'application/vnd.mediastation.cdkey': ['cdkey'], + 'application/vnd.mfer': ['mwf'], + 'application/vnd.mfmp': ['mfm'], + 'application/vnd.micrografx.flo': ['flo'], + 'application/vnd.micrografx.igx': ['igx'], + 'application/vnd.mif': ['mif'], + 'application/vnd.mobius.daf': ['daf'], + 'application/vnd.mobius.dis': ['dis'], + 'application/vnd.mobius.mbk': ['mbk'], + 'application/vnd.mobius.mqy': ['mqy'], + 'application/vnd.mobius.msl': ['msl'], + 'application/vnd.mobius.plc': ['plc'], + 'application/vnd.mobius.txf': ['txf'], + 'application/vnd.mophun.application': ['mpn'], + 'application/vnd.mophun.certificate': ['mpc'], + 'application/vnd.mozilla.xul+xml': ['xul'], + 'application/vnd.ms-artgalry': ['cil'], + 'application/vnd.ms-cab-compressed': ['cab'], + 'application/vnd.ms-excel': ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw'], + 'application/vnd.ms-excel.addin.macroenabled.12': ['xlam'], + 'application/vnd.ms-excel.sheet.binary.macroenabled.12': ['xlsb'], + 'application/vnd.ms-excel.sheet.macroenabled.12': ['xlsm'], + 'application/vnd.ms-excel.template.macroenabled.12': ['xltm'], + 'application/vnd.ms-fontobject': ['eot'], + 'application/vnd.ms-htmlhelp': ['chm'], + 'application/vnd.ms-ims': ['ims'], + 'application/vnd.ms-lrm': ['lrm'], + 'application/vnd.ms-officetheme': ['thmx'], + 'application/vnd.ms-pki.seccat': ['cat'], + 'application/vnd.ms-pki.stl': ['stl'], + 'application/vnd.ms-powerpoint': ['ppt', 'pot', 'pps'], + 'application/vnd.ms-powerpoint.addin.macroenabled.12': ['ppam'], + 'application/vnd.ms-powerpoint.presentation.macroenabled.12': ['pptm'], + 'application/vnd.ms-powerpoint.slide.macroenabled.12': ['sldm'], + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12': ['ppsm'], + 'application/vnd.ms-powerpoint.template.macroenabled.12': ['potm'], + 'application/vnd.ms-project': ['mpp', 'mpt'], + 'application/vnd.ms-word.document.macroenabled.12': ['docm'], + 'application/vnd.ms-word.template.macroenabled.12': ['dotm'], + 'application/vnd.ms-works': ['wps', 'wcm', 'wdb', 'wks'], + 'application/vnd.ms-wpl': ['wpl'], + 'application/vnd.ms-xpsdocument': ['xps'], + 'application/vnd.mseq': ['mseq'], + 'application/vnd.musician': ['mus'], + 'application/vnd.muvee.style': ['msty'], + 'application/vnd.mynfc': ['taglet'], + 'application/vnd.neurolanguage.nlu': ['nlu'], + 'application/vnd.nitf': ['ntf', 'nitf'], + 'application/vnd.noblenet-directory': ['nnd'], + 'application/vnd.noblenet-sealer': ['nns'], + 'application/vnd.noblenet-web': ['nnw'], + 'application/vnd.nokia.n-gage.data': ['ngdat'], + 'application/vnd.nokia.n-gage.symbian.install': ['n-gage'], + 'application/vnd.nokia.radio-preset': ['rpst'], + 'application/vnd.nokia.radio-presets': ['rpss'], + 'application/vnd.novadigm.edm': ['edm'], + 'application/vnd.novadigm.edx': ['edx'], + 'application/vnd.novadigm.ext': ['ext'], + 'application/vnd.oasis.opendocument.chart': ['odc'], + 'application/vnd.oasis.opendocument.chart-template': ['otc'], + 'application/vnd.oasis.opendocument.database': ['odb'], + 'application/vnd.oasis.opendocument.formula': ['odf'], + 'application/vnd.oasis.opendocument.formula-template': ['odft'], + 'application/vnd.oasis.opendocument.graphics': ['odg'], + 'application/vnd.oasis.opendocument.graphics-template': ['otg'], + 'application/vnd.oasis.opendocument.image': ['odi'], + 'application/vnd.oasis.opendocument.image-template': ['oti'], + 'application/vnd.oasis.opendocument.presentation': ['odp'], + 'application/vnd.oasis.opendocument.presentation-template': ['otp'], + 'application/vnd.oasis.opendocument.spreadsheet': ['ods'], + 'application/vnd.oasis.opendocument.spreadsheet-template': ['ots'], + 'application/vnd.oasis.opendocument.text': ['odt'], + 'application/vnd.oasis.opendocument.text-master': ['odm'], + 'application/vnd.oasis.opendocument.text-template': ['ott'], + 'application/vnd.oasis.opendocument.text-web': ['oth'], + 'application/vnd.olpc-sugar': ['xo'], + 'application/vnd.oma.dd2+xml': ['dd2'], + 'application/vnd.openofficeorg.extension': ['oxt'], + 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [ + 'pptx' + ], + 'application/vnd.openxmlformats-officedocument.presentationml.slide': [ + 'sldx' + ], + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow': [ + 'ppsx' + ], + 'application/vnd.openxmlformats-officedocument.presentationml.template': [ + 'potx' + ], + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['xlsx'], + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': [ + 'xltx' + ], + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [ + 'docx' + ], + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': [ + 'dotx' + ], + 'application/vnd.osgeo.mapguide.package': ['mgp'], + 'application/vnd.osgi.dp': ['dp'], + 'application/vnd.osgi.subsystem': ['esa'], + 'application/vnd.palm': ['pdb', 'oprc', 'pqa'], + 'application/vnd.pawaafile': ['paw'], + 'application/vnd.pg.format': ['str'], + 'application/vnd.pg.osasli': ['ei6'], + 'application/vnd.picsel': ['efif'], + 'application/vnd.pmi.widget': ['wg'], + 'application/vnd.pocketlearn': ['plf'], + 'application/vnd.powerbuilder6': ['pbd'], + 'application/vnd.previewsystems.box': ['box'], + 'application/vnd.proteus.magazine': ['mgz'], + 'application/vnd.publishare-delta-tree': ['qps'], + 'application/vnd.pvi.ptid1': ['ptid'], + 'application/vnd.quark.quarkxpress': [ + 'qxd', + 'qwd', + 'qwt', + 'qxb', + 'qxl', + 'qxt' + ], + 'application/vnd.realvnc.bed': ['bed'], + 'application/vnd.recordare.musicxml': ['mxl'], + 'application/vnd.recordare.musicxml+xml': ['musicxml'], + 'application/vnd.rig.cryptonote': ['cryptonote'], + 'application/vnd.rim.cod': ['cod'], + 'application/vnd.rn-realmedia': ['rm'], + 'application/vnd.rn-realmedia-vbr': ['rmvb'], + 'application/vnd.route66.link66+xml': ['link66'], + 'application/vnd.sailingtracker.track': ['st'], + 'application/vnd.seemail': ['see'], + 'application/vnd.sema': ['sema'], + 'application/vnd.semd': ['semd'], + 'application/vnd.semf': ['semf'], + 'application/vnd.shana.informed.formdata': ['ifm'], + 'application/vnd.shana.informed.formtemplate': ['itp'], + 'application/vnd.shana.informed.interchange': ['iif'], + 'application/vnd.shana.informed.package': ['ipk'], + 'application/vnd.simtech-mindmapper': ['twd', 'twds'], + 'application/vnd.smaf': ['mmf'], + 'application/vnd.smart.teacher': ['teacher'], + 'application/vnd.solent.sdkm+xml': ['sdkm', 'sdkd'], + 'application/vnd.spotfire.dxp': ['dxp'], + 'application/vnd.spotfire.sfs': ['sfs'], + 'application/vnd.stardivision.calc': ['sdc'], + 'application/vnd.stardivision.draw': ['sda'], + 'application/vnd.stardivision.impress': ['sdd'], + 'application/vnd.stardivision.math': ['smf'], + 'application/vnd.stardivision.writer': ['sdw', 'vor'], + 'application/vnd.stardivision.writer-global': ['sgl'], + 'application/vnd.stepmania.package': ['smzip'], + 'application/vnd.stepmania.stepchart': ['sm'], + 'application/vnd.sun.xml.calc': ['sxc'], + 'application/vnd.sun.xml.calc.template': ['stc'], + 'application/vnd.sun.xml.draw': ['sxd'], + 'application/vnd.sun.xml.draw.template': ['std'], + 'application/vnd.sun.xml.impress': ['sxi'], + 'application/vnd.sun.xml.impress.template': ['sti'], + 'application/vnd.sun.xml.math': ['sxm'], + 'application/vnd.sun.xml.writer': ['sxw'], + 'application/vnd.sun.xml.writer.global': ['sxg'], + 'application/vnd.sun.xml.writer.template': ['stw'], + 'application/vnd.sus-calendar': ['sus', 'susp'], + 'application/vnd.svd': ['svd'], + 'application/vnd.symbian.install': ['sis', 'sisx'], + 'application/vnd.syncml+xml': ['xsm'], + 'application/vnd.syncml.dm+wbxml': ['bdm'], + 'application/vnd.syncml.dm+xml': ['xdm'], + 'application/vnd.tao.intent-module-archive': ['tao'], + 'application/vnd.tcpdump.pcap': ['pcap', 'cap', 'dmp'], + 'application/vnd.tmobile-livetv': ['tmo'], + 'application/vnd.trid.tpt': ['tpt'], + 'application/vnd.triscape.mxs': ['mxs'], + 'application/vnd.trueapp': ['tra'], + 'application/vnd.ufdl': ['ufd', 'ufdl'], + 'application/vnd.uiq.theme': ['utz'], + 'application/vnd.umajin': ['umj'], + 'application/vnd.unity': ['unityweb'], + 'application/vnd.uoml+xml': ['uoml'], + 'application/vnd.vcx': ['vcx'], + 'application/vnd.visio': ['vsd', 'vss', 'vst', 'vsw'], + 'application/vnd.visionary': ['vis'], + 'application/vnd.vsf': ['vsf'], + 'application/vnd.wap.wbxml': ['wbxml'], + 'application/vnd.wap.wmlc': ['wmlc'], + 'application/vnd.wap.wmlscriptc': ['wmlsc'], + 'application/vnd.webturbo': ['wtb'], + 'application/vnd.wolfram.player': ['nbp'], + 'application/vnd.wordperfect': ['wpd'], + 'application/vnd.wqd': ['wqd'], + 'application/vnd.wt.stf': ['stf'], + 'application/vnd.xara': ['xar'], + 'application/vnd.xfdl': ['xfdl'], + 'application/vnd.yamaha.hv-dic': ['hvd'], + 'application/vnd.yamaha.hv-script': ['hvs'], + 'application/vnd.yamaha.hv-voice': ['hvp'], + 'application/vnd.yamaha.openscoreformat': ['osf'], + 'application/vnd.yamaha.openscoreformat.osfpvg+xml': ['osfpvg'], + 'application/vnd.yamaha.smaf-audio': ['saf'], + 'application/vnd.yamaha.smaf-phrase': ['spf'], + 'application/vnd.yellowriver-custom-menu': ['cmp'], + 'application/vnd.zul': ['zir', 'zirz'], + 'application/vnd.zzazz.deck+xml': ['zaz'], + 'application/voicexml+xml': ['vxml'], + 'application/wasm': ['wasm'], + 'application/widget': ['wgt'], + 'application/winhlp': ['hlp'], + 'application/wsdl+xml': ['wsdl'], + 'application/wspolicy+xml': ['wspolicy'], + 'application/x-7z-compressed': ['7z'], + 'application/x-abiword': ['abw'], + 'application/x-ace-compressed': ['ace'], + 'application/x-apple-diskimage': ['dmg'], + 'application/x-authorware-bin': ['aab', 'u32', 'vox', 'x32'], + 'application/x-authorware-map': ['aam'], + 'application/x-authorware-seg': ['aas'], + 'application/x-bcpio': ['bcpio'], + 'application/x-bittorrent': ['torrent'], + 'application/x-blorb': ['blb', 'blorb'], + 'application/x-bzip': ['bz'], + 'application/x-bzip2': ['bz2', 'boz'], + 'application/x-cbr': ['cbr', 'cb7', 'cba', 'cbt', 'cbz'], + 'application/x-cdlink': ['vcd'], + 'application/x-cfs-compressed': ['cfs'], + 'application/x-chat': ['chat'], + 'application/x-chess-pgn': ['pgn'], + 'application/x-conference': ['nsc'], + 'application/x-cpio': ['cpio'], + 'application/x-csh': ['csh'], + 'application/x-debian-package': ['deb', 'udeb'], + 'application/x-dgc-compressed': ['dgc'], + 'application/x-director': [ + 'dir', + 'cct', + 'cst', + 'cxt', + 'dcr', + 'dxr', + 'fgd', + 'swa', + 'w3d' + ], + 'application/x-doom': ['wad'], + 'application/x-dtbncx+xml': ['ncx'], + 'application/x-dtbook+xml': ['dtb'], + 'application/x-dtbresource+xml': ['res'], + 'application/x-dvi': ['dvi'], + 'application/x-envoy': ['evy'], + 'application/x-eva': ['eva'], + 'application/x-font-bdf': ['bdf'], + 'application/x-font-ghostscript': ['gsf'], + 'application/x-font-linux-psf': ['psf'], + 'application/x-font-pcf': ['pcf'], + 'application/x-font-snf': ['snf'], + 'application/x-font-type1': ['pfa', 'afm', 'pfb', 'pfm'], + 'application/x-freearc': ['arc'], + 'application/x-futuresplash': ['spl'], + 'application/x-gca-compressed': ['gca'], + 'application/x-glulx': ['ulx'], + 'application/x-gnumeric': ['gnumeric'], + 'application/x-gramps-xml': ['gramps'], + 'application/x-gtar': ['gtar'], + 'application/x-hdf': ['hdf'], + 'application/x-install-instructions': ['install'], + 'application/x-iso9660-image': ['iso'], + 'application/x-java-jnlp-file': ['jnlp'], + 'application/x-latex': ['latex'], + 'application/x-lzh-compressed': ['lzh', 'lha'], + 'application/x-mie': ['mie'], + 'application/x-mobipocket-ebook': ['prc', 'mobi'], + 'application/x-ms-application': ['application'], + 'application/x-ms-shortcut': ['lnk'], + 'application/x-ms-wmd': ['wmd'], + 'application/x-ms-wmz': ['wmz'], + 'application/x-ms-xbap': ['xbap'], + 'application/x-msaccess': ['mdb'], + 'application/x-msbinder': ['obd'], + 'application/x-mscardfile': ['crd'], + 'application/x-msclip': ['clp'], + 'application/x-msdownload': ['exe', 'bat', 'com', 'dll', 'msi'], + 'application/x-msmediaview': ['mvb', 'm13', 'm14'], + 'application/x-msmetafile': ['wmf', 'emf', 'emz', 'wmz'], + 'application/x-msmoney': ['mny'], + 'application/x-mspublisher': ['pub'], + 'application/x-msschedule': ['scd'], + 'application/x-msterminal': ['trm'], + 'application/x-mswrite': ['wri'], + 'application/x-netcdf': ['nc', 'cdf'], + 'application/x-nzb': ['nzb'], + 'application/x-pkcs12': ['p12', 'pfx'], + 'application/x-pkcs7-certificates': ['p7b', 'spc'], + 'application/x-pkcs7-certreqresp': ['p7r'], + 'application/x-rar-compressed': ['rar'], + 'application/x-research-info-systems': ['ris'], + 'application/x-sh': ['sh'], + 'application/x-shar': ['shar'], + 'application/x-shockwave-flash': ['swf'], + 'application/x-silverlight-app': ['xap'], + 'application/x-sql': ['sql'], + 'application/x-stuffit': ['sit'], + 'application/x-stuffitx': ['sitx'], + 'application/x-subrip': ['srt'], + 'application/x-sv4cpio': ['sv4cpio'], + 'application/x-sv4crc': ['sv4crc'], + 'application/x-t3vm-image': ['t3'], + 'application/x-tads': ['gam'], + 'application/x-tar': ['tar'], + 'application/x-tcl': ['tcl'], + 'application/x-tex': ['tex'], + 'application/x-tex-tfm': ['tfm'], + 'application/x-texinfo': ['texinfo', 'texi'], + 'application/x-tgif': ['obj'], + 'application/x-ustar': ['ustar'], + 'application/x-wais-source': ['src'], + 'application/x-x509-ca-cert': ['der', 'crt'], + 'application/x-xfig': ['fig'], + 'application/x-xliff+xml': ['xlf'], + 'application/x-xpinstall': ['xpi'], + 'application/x-xz': ['xz'], + 'application/x-zmachine': ['z1', 'z2', 'z3', 'z4', 'z5', 'z6', 'z7', 'z8'], + 'application/xaml+xml': ['xaml'], + 'application/xcap-diff+xml': ['xdf'], + 'application/xenc+xml': ['xenc'], + 'application/xhtml+xml': ['xhtml', 'xht'], + 'application/xml': ['xml', 'xsl'], + 'application/xml-dtd': ['dtd'], + 'application/xop+xml': ['xop'], + 'application/xproc+xml': ['xpl'], + 'application/xslt+xml': ['xslt'], + 'application/xspf+xml': ['xspf'], + 'application/xv+xml': ['mxml', 'xhvml', 'xvm', 'xvml'], + 'application/yang': ['yang'], + 'application/yin+xml': ['yin'], + 'application/zip': ['zip'], + 'audio/aac': ['aac'], + 'audio/adpcm': ['adp'], + 'audio/basic': ['au', 'snd'], + 'audio/midi': ['mid', 'kar', 'midi', 'rmi'], + 'audio/mp4': ['m4a', 'mp4a'], + 'audio/mpeg': ['mp3', 'm2a', 'm3a', 'mp2', 'mp2a', 'mpga'], + 'audio/ogg': ['ogg', 'oga', 'opus', 'spx'], + 'audio/s3m': ['s3m'], + 'audio/silk': ['sil'], + 'audio/vnd.dece.audio': ['uva', 'uvva'], + 'audio/vnd.digital-winds': ['eol'], + 'audio/vnd.dra': ['dra'], + 'audio/vnd.dts': ['dts'], + 'audio/vnd.dts.hd': ['dtshd'], + 'audio/vnd.lucent.voice': ['lvp'], + 'audio/vnd.ms-playready.media.pya': ['pya'], + 'audio/vnd.nuera.ecelp4800': ['ecelp4800'], + 'audio/vnd.nuera.ecelp7470': ['ecelp7470'], + 'audio/vnd.nuera.ecelp9600': ['ecelp9600'], + 'audio/vnd.rip': ['rip'], + 'audio/webm': ['weba'], + 'audio/x-aiff': ['aif', 'aifc', 'aiff'], + 'audio/x-caf': ['caf'], + 'audio/x-flac': ['flac'], + 'audio/x-matroska': ['mka'], + 'audio/x-mpegurl': ['m3u'], + 'audio/x-ms-wax': ['wax'], + 'audio/x-ms-wma': ['wma'], + 'audio/x-pn-realaudio': ['ram', 'ra'], + 'audio/x-pn-realaudio-plugin': ['rmp'], + 'audio/x-wav': ['wav'], + 'audio/xm': ['xm'], + 'chemical/x-cdx': ['cdx'], + 'chemical/x-cif': ['cif'], + 'chemical/x-cmdf': ['cmdf'], + 'chemical/x-cml': ['cml'], + 'chemical/x-csml': ['csml'], + 'chemical/x-xyz': ['xyz'], + 'font/collection': ['ttc'], + 'font/otf': ['otf'], + 'font/ttf': ['ttf'], + 'font/woff': ['woff'], + 'font/woff2': ['woff2'], + 'image/avif': ['avif'], + 'image/bmp': ['bmp'], + 'image/cgm': ['cgm'], + 'image/g3fax': ['g3'], + 'image/gif': ['gif'], + 'image/heic': ['heic'], + 'image/heif': ['heif'], + 'image/ief': ['ief'], + 'image/jpeg': ['jpg', 'jpe', 'jpeg'], + 'image/jxl': ['jxl'], + 'image/ktx': ['ktx'], + 'image/png': ['png'], + 'image/prs.btif': ['btif'], + 'image/sgi': ['sgi'], + 'image/svg+xml': ['svg', 'svgz'], + 'image/tiff': ['tiff', 'tif'], + 'image/vnd.adobe.photoshop': ['psd'], + 'image/vnd.dece.graphic': ['uvi', 'uvg', 'uvvg', 'uvvi'], + 'image/vnd.djvu': ['djvu', 'djv'], + 'image/vnd.dvb.subtitle': ['sub'], + 'image/vnd.dwg': ['dwg'], + 'image/vnd.dxf': ['dxf'], + 'image/vnd.fastbidsheet': ['fbs'], + 'image/vnd.fpx': ['fpx'], + 'image/vnd.fst': ['fst'], + 'image/vnd.fujixerox.edmics-mmr': ['mmr'], + 'image/vnd.fujixerox.edmics-rlc': ['rlc'], + 'image/vnd.ms-modi': ['mdi'], + 'image/vnd.ms-photo': ['wdp'], + 'image/vnd.net-fpx': ['npx'], + 'image/vnd.wap.wbmp': ['wbmp'], + 'image/vnd.xiff': ['xif'], + 'image/webp': ['webp'], + 'image/x-3ds': ['3ds'], + 'image/x-cmu-raster': ['ras'], + 'image/x-cmx': ['cmx'], + 'image/x-freehand': ['fh', 'fh4', 'fh5', 'fh7', 'fhc'], + 'image/x-icon': ['ico'], + 'image/x-mrsid-image': ['sid'], + 'image/x-pcx': ['pcx'], + 'image/x-pict': ['pic', 'pct'], + 'image/x-portable-anymap': ['pnm'], + 'image/x-portable-bitmap': ['pbm'], + 'image/x-portable-graymap': ['pgm'], + 'image/x-portable-pixmap': ['ppm'], + 'image/x-rgb': ['rgb'], + 'image/x-tga': ['tga'], + 'image/x-xbitmap': ['xbm'], + 'image/x-xpixmap': ['xpm'], + 'image/x-xwindowdump': ['xwd'], + 'message/rfc822': ['eml', 'mime'], + 'model/gltf+json': ['gltf'], + 'model/gltf-binary': ['glb'], + 'model/iges': ['igs', 'iges'], + 'model/mesh': ['msh', 'mesh', 'silo'], + 'model/vnd.collada+xml': ['dae'], + 'model/vnd.dwf': ['dwf'], + 'model/vnd.gdl': ['gdl'], + 'model/vnd.gtw': ['gtw'], + 'model/vnd.vtu': ['vtu'], + 'model/vrml': ['vrml', 'wrl'], + 'model/x3d+binary': ['x3db', 'x3dbz'], + 'model/x3d+vrml': ['x3dv', 'x3dvz'], + 'model/x3d+xml': ['x3d', 'x3dz'], + 'text/cache-manifest': ['appcache'], + 'text/calendar': ['ics', 'ifb'], + 'text/css': ['css'], + 'text/csv': ['csv'], + 'text/html': ['html', 'htm'], + 'text/javascript': ['js', 'mjs'], + 'text/markdown': ['md', 'markdown'], + 'text/n3': ['n3'], + 'text/plain': ['txt', 'conf', 'def', 'in', 'list', 'log', 'text'], + 'text/prs.lines.tag': ['dsc'], + 'text/richtext': ['rtx'], + 'text/sgml': ['sgml', 'sgm'], + 'text/tab-separated-values': ['tsv'], + 'text/troff': ['t', 'man', 'me', 'ms', 'roff', 'tr'], + 'text/turtle': ['ttl'], + 'text/uri-list': ['uri', 'uris', 'urls'], + 'text/vcard': ['vcard'], + 'text/vnd.curl': ['curl'], + 'text/vnd.curl.dcurl': ['dcurl'], + 'text/vnd.curl.mcurl': ['mcurl'], + 'text/vnd.curl.scurl': ['scurl'], + 'text/vnd.dvb.subtitle': ['sub'], + 'text/vnd.fly': ['fly'], + 'text/vnd.fmi.flexstor': ['flx'], + 'text/vnd.graphviz': ['gv'], + 'text/vnd.in3d.3dml': ['3dml'], + 'text/vnd.in3d.spot': ['spot'], + 'text/vnd.sun.j2me.app-descriptor': ['jad'], + 'text/vnd.wap.wml': ['wml'], + 'text/vnd.wap.wmlscript': ['wmls'], + 'text/x-asm': ['asm', 's'], + 'text/x-c': ['c', 'cc', 'cpp', 'cxx', 'dic', 'h', 'hh'], + 'text/x-dart': ['dart'], + 'text/x-fortran': ['f', 'f77', 'f90', 'for'], + 'text/x-java-source': ['java'], + 'text/x-nfo': ['nfo'], + 'text/x-opml': ['opml'], + 'text/x-pascal': ['pas', 'p'], + 'text/x-setext': ['etx'], + 'text/x-sfv': ['sfv'], + 'text/x-uuencode': ['uu'], + 'text/x-vcalendar': ['vcs'], + 'text/x-vcard': ['vcf'], + 'video/3gpp': ['3gp'], + 'video/3gpp2': ['3g2'], + 'video/h261': ['h261'], + 'video/h263': ['h263'], + 'video/h264': ['h264'], + 'video/jpeg': ['jpgv'], + 'video/jpm': ['jpm', 'jpgm'], + 'video/mj2': ['mj2', 'mjp2'], + 'video/mp2t': ['ts', 'm2t', 'm2ts', 'mts'], + 'video/mp4': ['mp4', 'mp4v', 'mpg4'], + 'video/mpeg': ['mpg', 'm1v', 'm2v', 'mpe', 'mpeg'], + 'video/ogg': ['ogv'], + 'video/quicktime': ['mov', 'qt'], + 'video/vnd.dece.hd': ['uvh', 'uvvh'], + 'video/vnd.dece.mobile': ['uvm', 'uvvm'], + 'video/vnd.dece.pd': ['uvp', 'uvvp'], + 'video/vnd.dece.sd': ['uvs', 'uvvs'], + 'video/vnd.dece.video': ['uvv', 'uvvv'], + 'video/vnd.dvb.file': ['dvb'], + 'video/vnd.fvt': ['fvt'], + 'video/vnd.mpegurl': ['mxu', 'm4u'], + 'video/vnd.ms-playready.media.pyv': ['pyv'], + 'video/vnd.uvvu.mp4': ['uvu', 'uvvu'], + 'video/vnd.vivo': ['viv'], + 'video/webm': ['webm'], + 'video/x-f4v': ['f4v'], + 'video/x-fli': ['fli'], + 'video/x-flv': ['flv'], + 'video/x-m4v': ['m4v'], + 'video/x-matroska': ['mkv', 'mk3d', 'mks'], + 'video/x-mng': ['mng'], + 'video/x-ms-asf': ['asf', 'asx'], + 'video/x-ms-vob': ['vob'], + 'video/x-ms-wm': ['wm'], + 'video/x-ms-wmv': ['wmv'], + 'video/x-ms-wmx': ['wmx'], + 'video/x-ms-wvx': ['wvx'], + 'video/x-msvideo': ['avi'], + 'video/x-sgi-movie': ['movie'], + 'video/x-smv': ['smv'], + 'x-conference/x-cooltalk': ['ice'], +}; + +/// A map of file extensions to their associated mime type. +const Map extensionToMedia = { + 'ez': 'application/andrew-inset', + 'aw': 'application/applixware', + 'atom': 'application/atom+xml', + 'atomcat': 'application/atomcat+xml', + 'atomsvc': 'application/atomsvc+xml', + 'ccxml': 'application/ccxml+xml', + 'cdmia': 'application/cdmi-capability', + 'cdmic': 'application/cdmi-container', + 'cdmid': 'application/cdmi-domain', + 'cdmio': 'application/cdmi-object', + 'cdmiq': 'application/cdmi-queue', + 'cu': 'application/cu-seeme', + 'davmount': 'application/davmount+xml', + 'dcm': 'application/dicom', + 'dbk': 'application/docbook+xml', + 'dssc': 'application/dssc+der', + 'xdssc': 'application/dssc+xml', + 'ecma': 'application/ecmascript', + 'emma': 'application/emma+xml', + 'epub': 'application/epub+zip', + 'exi': 'application/exi', + 'pfr': 'application/font-tdpfr', + 'gml': 'application/gml+xml', + 'gpx': 'application/gpx+xml', + 'gxf': 'application/gxf', + 'stk': 'application/hyperstudio', + 'ink': 'application/inkml+xml', + 'inkml': 'application/inkml+xml', + 'ipfix': 'application/ipfix', + 'jar': 'application/java-archive', + 'ser': 'application/java-serialized-object', + 'class': 'application/java-vm', + 'json': 'application/json', + 'jsonml': 'application/jsonml+json', + 'lostxml': 'application/lost+xml', + 'hqx': 'application/mac-binhex40', + 'cpt': 'application/mac-compactpro', + 'mads': 'application/mads+xml', + 'webmanifest': 'application/manifest+json', + 'mrc': 'application/marc', + 'mrcx': 'application/marcxml+xml', + 'nb': 'application/mathematica', + 'ma': 'application/mathematica', + 'mb': 'application/mathematica', + 'mathml': 'application/mathml+xml', + 'mbox': 'application/mbox', + 'mscml': 'application/mediaservercontrol+xml', + 'metalink': 'application/metalink+xml', + 'meta4': 'application/metalink4+xml', + 'mets': 'application/mets+xml', + 'mods': 'application/mods+xml', + 'mp21': 'application/mp21', + 'm21': 'application/mp21', + 'mp4s': 'application/mp4', + 'doc': 'application/msword', + 'dot': 'application/msword', + 'mxf': 'application/mxf', + 'bin': 'application/octet-stream', + 'bpk': 'application/octet-stream', + 'deploy': 'application/octet-stream', + 'dist': 'application/octet-stream', + 'distz': 'application/octet-stream', + 'dms': 'application/octet-stream', + 'dump': 'application/octet-stream', + 'elc': 'application/octet-stream', + 'lrf': 'application/octet-stream', + 'mar': 'application/octet-stream', + 'pkg': 'application/octet-stream', + 'so': 'application/octet-stream', + 'oda': 'application/oda', + 'opf': 'application/oebps-package+xml', + 'ogx': 'application/ogg', + 'omdoc': 'application/omdoc+xml', + 'onetoc': 'application/onenote', + 'onepkg': 'application/onenote', + 'onetmp': 'application/onenote', + 'onetoc2': 'application/onenote', + 'oxps': 'application/oxps', + 'xer': 'application/patch-ops-error+xml', + 'pdf': 'application/pdf', + 'pgp': 'application/pgp-encrypted', + 'asc': 'application/pgp-signature', + 'sig': 'application/pgp-signature', + 'prf': 'application/pics-rules', + 'p10': 'application/pkcs10', + 'p7m': 'application/pkcs7-mime', + 'p7c': 'application/pkcs7-mime', + 'p7s': 'application/pkcs7-signature', + 'p8': 'application/pkcs8', + 'ac': 'application/pkix-attr-cert', + 'cer': 'application/pkix-cert', + 'crl': 'application/pkix-crl', + 'pkipath': 'application/pkix-pkipath', + 'pki': 'application/pkixcmp', + 'pls': 'application/pls+xml', + 'ps': 'application/postscript', + 'ai': 'application/postscript', + 'eps': 'application/postscript', + 'cww': 'application/prs.cww', + 'pskcxml': 'application/pskc+xml', + 'rdf': 'application/rdf+xml', + 'rif': 'application/reginfo+xml', + 'rnc': 'application/relax-ng-compact-syntax', + 'rl': 'application/resource-lists+xml', + 'rld': 'application/resource-lists-diff+xml', + 'rs': 'application/rls-services+xml', + 'gbr': 'application/rpki-ghostbusters', + 'mft': 'application/rpki-manifest', + 'roa': 'application/rpki-roa', + 'rsd': 'application/rsd+xml', + 'rss': 'application/rss+xml', + 'rtf': 'application/rtf', + 'sbml': 'application/sbml+xml', + 'scq': 'application/scvp-cv-request', + 'scs': 'application/scvp-cv-response', + 'spq': 'application/scvp-vp-request', + 'spp': 'application/scvp-vp-response', + 'sdp': 'application/sdp', + 'setpay': 'application/set-payment-initiation', + 'setreg': 'application/set-registration-initiation', + 'shf': 'application/shf+xml', + 'smil': 'application/smil+xml', + 'smi': 'application/smil+xml', + 'rq': 'application/sparql-query', + 'srx': 'application/sparql-results+xml', + 'gram': 'application/srgs', + 'grxml': 'application/srgs+xml', + 'sru': 'application/sru+xml', + 'ssdl': 'application/ssdl+xml', + 'ssml': 'application/ssml+xml', + 'tei': 'application/tei+xml', + 'teicorpus': 'application/tei+xml', + 'tfi': 'application/thraud+xml', + 'tsd': 'application/timestamped-data', + 'toml': 'application/toml', + 'plb': 'application/vnd.3gpp.pic-bw-large', + 'psb': 'application/vnd.3gpp.pic-bw-small', + 'pvb': 'application/vnd.3gpp.pic-bw-var', + 'tcap': 'application/vnd.3gpp2.tcap', + 'pwn': 'application/vnd.3m.post-it-notes', + 'aso': 'application/vnd.accpac.simply.aso', + 'imp': 'application/vnd.accpac.simply.imp', + 'acu': 'application/vnd.acucobol', + 'atc': 'application/vnd.acucorp', + 'acutc': 'application/vnd.acucorp', + 'air': 'application/vnd.adobe.air-application-installer-package+zip', + 'fcdt': 'application/vnd.adobe.formscentral.fcdt', + 'fxp': 'application/vnd.adobe.fxp', + 'fxpl': 'application/vnd.adobe.fxp', + 'xdp': 'application/vnd.adobe.xdp+xml', + 'xfdf': 'application/vnd.adobe.xfdf', + 'ahead': 'application/vnd.ahead.space', + 'azf': 'application/vnd.airzip.filesecure.azf', + 'azs': 'application/vnd.airzip.filesecure.azs', + 'azw': 'application/vnd.amazon.ebook', + 'acc': 'application/vnd.americandynamics.acc', + 'ami': 'application/vnd.amiga.ami', + 'apk': 'application/vnd.android.package-archive', + 'cii': 'application/vnd.anser-web-certificate-issue-initiation', + 'fti': 'application/vnd.anser-web-funds-transfer-initiation', + 'atx': 'application/vnd.antix.game-component', + 'mpkg': 'application/vnd.apple.installer+xml', + 'm3u8': 'application/vnd.apple.mpegurl', + 'swi': 'application/vnd.aristanetworks.swi', + 'iota': 'application/vnd.astraea-software.iota', + 'aep': 'application/vnd.audiograph', + 'mpm': 'application/vnd.blueice.multipass', + 'bmi': 'application/vnd.bmi', + 'rep': 'application/vnd.businessobjects', + 'cdxml': 'application/vnd.chemdraw+xml', + 'mmd': 'application/vnd.chipnuts.karaoke-mmd', + 'cdy': 'application/vnd.cinderella', + 'cla': 'application/vnd.claymore', + 'rp9': 'application/vnd.cloanto.rp9', + 'c4g': 'application/vnd.clonk.c4group', + 'c4d': 'application/vnd.clonk.c4group', + 'c4f': 'application/vnd.clonk.c4group', + 'c4p': 'application/vnd.clonk.c4group', + 'c4u': 'application/vnd.clonk.c4group', + 'c11amc': 'application/vnd.cluetrust.cartomobile-config', + 'c11amz': 'application/vnd.cluetrust.cartomobile-config-pkg', + 'csp': 'application/vnd.commonspace', + 'cdbcmsg': 'application/vnd.contact.cmsg', + 'cmc': 'application/vnd.cosmocaller', + 'clkx': 'application/vnd.crick.clicker', + 'clkk': 'application/vnd.crick.clicker.keyboard', + 'clkp': 'application/vnd.crick.clicker.palette', + 'clkt': 'application/vnd.crick.clicker.template', + 'clkw': 'application/vnd.crick.clicker.wordbank', + 'wbs': 'application/vnd.criticaltools.wbs+xml', + 'pml': 'application/vnd.ctc-posml', + 'ppd': 'application/vnd.cups-ppd', + 'car': 'application/vnd.curl.car', + 'pcurl': 'application/vnd.curl.pcurl', + 'rdz': 'application/vnd.data-vision.rdz', + 'uvf': 'application/vnd.dece.data', + 'uvd': 'application/vnd.dece.data', + 'uvvd': 'application/vnd.dece.data', + 'uvvf': 'application/vnd.dece.data', + 'uvt': 'application/vnd.dece.ttml+xml', + 'uvvt': 'application/vnd.dece.ttml+xml', + 'uvx': 'application/vnd.dece.unspecified', + 'uvvx': 'application/vnd.dece.unspecified', + 'uvz': 'application/vnd.dece.zip', + 'uvvz': 'application/vnd.dece.zip', + 'fe_launch': 'application/vnd.denovo.fcselayout-link', + 'dna': 'application/vnd.dna', + 'mlp': 'application/vnd.dolby.mlp', + 'dpg': 'application/vnd.dpgraph', + 'dfac': 'application/vnd.dreamfactory', + 'kpxx': 'application/vnd.ds-keypoint', + 'ait': 'application/vnd.dvb.ait', + 'svc': 'application/vnd.dvb.service', + 'geo': 'application/vnd.dynageo', + 'mag': 'application/vnd.ecowin.chart', + 'nml': 'application/vnd.enliven', + 'esf': 'application/vnd.epson.esf', + 'msf': 'application/vnd.epson.msf', + 'qam': 'application/vnd.epson.quickanime', + 'slt': 'application/vnd.epson.salt', + 'ssf': 'application/vnd.epson.ssf', + 'es3': 'application/vnd.eszigno3+xml', + 'et3': 'application/vnd.eszigno3+xml', + 'ez2': 'application/vnd.ezpix-album', + 'ez3': 'application/vnd.ezpix-package', + 'fdf': 'application/vnd.fdf', + 'mseed': 'application/vnd.fdsn.mseed', + 'seed': 'application/vnd.fdsn.seed', + 'dataless': 'application/vnd.fdsn.seed', + 'gph': 'application/vnd.flographit', + 'ftc': 'application/vnd.fluxtime.clip', + 'fm': 'application/vnd.framemaker', + 'book': 'application/vnd.framemaker', + 'frame': 'application/vnd.framemaker', + 'maker': 'application/vnd.framemaker', + 'fnc': 'application/vnd.frogans.fnc', + 'ltf': 'application/vnd.frogans.ltf', + 'fsc': 'application/vnd.fsc.weblaunch', + 'oas': 'application/vnd.fujitsu.oasys', + 'oa2': 'application/vnd.fujitsu.oasys2', + 'oa3': 'application/vnd.fujitsu.oasys3', + 'fg5': 'application/vnd.fujitsu.oasysgp', + 'bh2': 'application/vnd.fujitsu.oasysprs', + 'ddd': 'application/vnd.fujixerox.ddd', + 'xdw': 'application/vnd.fujixerox.docuworks', + 'xbd': 'application/vnd.fujixerox.docuworks.binder', + 'fzs': 'application/vnd.fuzzysheet', + 'txd': 'application/vnd.genomatix.tuxedo', + 'ggb': 'application/vnd.geogebra.file', + 'ggs': 'application/vnd.geogebra.slides', + 'ggt': 'application/vnd.geogebra.tool', + 'gex': 'application/vnd.geometry-explorer', + 'gre': 'application/vnd.geometry-explorer', + 'gxt': 'application/vnd.geonext', + 'g2w': 'application/vnd.geoplan', + 'g3w': 'application/vnd.geospace', + 'gmx': 'application/vnd.gmx', + 'kml': 'application/vnd.google-earth.kml+xml', + 'kmz': 'application/vnd.google-earth.kmz', + 'gqf': 'application/vnd.grafeq', + 'gqs': 'application/vnd.grafeq', + 'gac': 'application/vnd.groove-account', + 'ghf': 'application/vnd.groove-help', + 'gim': 'application/vnd.groove-identity-message', + 'grv': 'application/vnd.groove-injector', + 'gtm': 'application/vnd.groove-tool-message', + 'tpl': 'application/vnd.groove-tool-template', + 'vcg': 'application/vnd.groove-vcard', + 'hal': 'application/vnd.hal+xml', + 'zmm': 'application/vnd.handheld-entertainment+xml', + 'hbci': 'application/vnd.hbci', + 'les': 'application/vnd.hhe.lesson-player', + 'hpgl': 'application/vnd.hp-hpgl', + 'hpid': 'application/vnd.hp-hpid', + 'hps': 'application/vnd.hp-hps', + 'jlt': 'application/vnd.hp-jlyt', + 'pcl': 'application/vnd.hp-pcl', + 'pclxl': 'application/vnd.hp-pclxl', + 'sfd-hdstx': 'application/vnd.hydrostatix.sof-data', + 'mpy': 'application/vnd.ibm.minipay', + 'afp': 'application/vnd.ibm.modcap', + 'list3820': 'application/vnd.ibm.modcap', + 'listafp': 'application/vnd.ibm.modcap', + 'irm': 'application/vnd.ibm.rights-management', + 'sc': 'application/vnd.ibm.secure-container', + 'icc': 'application/vnd.iccprofile', + 'icm': 'application/vnd.iccprofile', + 'igl': 'application/vnd.igloader', + 'ivp': 'application/vnd.immervision-ivp', + 'ivu': 'application/vnd.immervision-ivu', + 'igm': 'application/vnd.insors.igm', + 'xpw': 'application/vnd.intercon.formnet', + 'xpx': 'application/vnd.intercon.formnet', + 'i2g': 'application/vnd.intergeo', + 'qbo': 'application/vnd.intu.qbo', + 'qfx': 'application/vnd.intu.qfx', + 'rcprofile': 'application/vnd.ipunplugged.rcprofile', + 'irp': 'application/vnd.irepository.package+xml', + 'xpr': 'application/vnd.is-xpr', + 'fcs': 'application/vnd.isac.fcs', + 'jam': 'application/vnd.jam', + 'rms': 'application/vnd.jcp.javame.midlet-rms', + 'jisp': 'application/vnd.jisp', + 'joda': 'application/vnd.joost.joda-archive', + 'ktz': 'application/vnd.kahootz', + 'ktr': 'application/vnd.kahootz', + 'karbon': 'application/vnd.kde.karbon', + 'chrt': 'application/vnd.kde.kchart', + 'kfo': 'application/vnd.kde.kformula', + 'flw': 'application/vnd.kde.kivio', + 'kon': 'application/vnd.kde.kontour', + 'kpr': 'application/vnd.kde.kpresenter', + 'kpt': 'application/vnd.kde.kpresenter', + 'ksp': 'application/vnd.kde.kspread', + 'kwd': 'application/vnd.kde.kword', + 'kwt': 'application/vnd.kde.kword', + 'htke': 'application/vnd.kenameaapp', + 'kia': 'application/vnd.kidspiration', + 'kne': 'application/vnd.kinar', + 'knp': 'application/vnd.kinar', + 'skp': 'application/vnd.koan', + 'skd': 'application/vnd.koan', + 'skm': 'application/vnd.koan', + 'skt': 'application/vnd.koan', + 'sse': 'application/vnd.kodak-descriptor', + 'lasxml': 'application/vnd.las.las+xml', + 'lbd': 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe': 'application/vnd.llamagraphics.life-balance.exchange+xml', + '123': 'application/vnd.lotus-1-2-3', + 'apr': 'application/vnd.lotus-approach', + 'pre': 'application/vnd.lotus-freelance', + 'nsf': 'application/vnd.lotus-notes', + 'org': 'application/vnd.lotus-organizer', + 'scm': 'application/vnd.lotus-screencam', + 'lwp': 'application/vnd.lotus-wordpro', + 'portpkg': 'application/vnd.macports.portpkg', + 'mcd': 'application/vnd.mcd', + 'mc1': 'application/vnd.medcalcdata', + 'cdkey': 'application/vnd.mediastation.cdkey', + 'mwf': 'application/vnd.mfer', + 'mfm': 'application/vnd.mfmp', + 'flo': 'application/vnd.micrografx.flo', + 'igx': 'application/vnd.micrografx.igx', + 'mif': 'application/vnd.mif', + 'daf': 'application/vnd.mobius.daf', + 'dis': 'application/vnd.mobius.dis', + 'mbk': 'application/vnd.mobius.mbk', + 'mqy': 'application/vnd.mobius.mqy', + 'msl': 'application/vnd.mobius.msl', + 'plc': 'application/vnd.mobius.plc', + 'txf': 'application/vnd.mobius.txf', + 'mpn': 'application/vnd.mophun.application', + 'mpc': 'application/vnd.mophun.certificate', + 'xul': 'application/vnd.mozilla.xul+xml', + 'cil': 'application/vnd.ms-artgalry', + 'cab': 'application/vnd.ms-cab-compressed', + 'xls': 'application/vnd.ms-excel', + 'xla': 'application/vnd.ms-excel', + 'xlc': 'application/vnd.ms-excel', + 'xlm': 'application/vnd.ms-excel', + 'xlt': 'application/vnd.ms-excel', + 'xlw': 'application/vnd.ms-excel', + 'xlam': 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlsb': 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm': 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xltm': 'application/vnd.ms-excel.template.macroenabled.12', + 'eot': 'application/vnd.ms-fontobject', + 'chm': 'application/vnd.ms-htmlhelp', + 'ims': 'application/vnd.ms-ims', + 'lrm': 'application/vnd.ms-lrm', + 'thmx': 'application/vnd.ms-officetheme', + 'cat': 'application/vnd.ms-pki.seccat', + 'stl': 'application/vnd.ms-pki.stl', + 'ppt': 'application/vnd.ms-powerpoint', + 'pot': 'application/vnd.ms-powerpoint', + 'pps': 'application/vnd.ms-powerpoint', + 'ppam': 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'pptm': 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'sldm': 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'ppsm': 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'potm': 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'mpp': 'application/vnd.ms-project', + 'mpt': 'application/vnd.ms-project', + 'docm': 'application/vnd.ms-word.document.macroenabled.12', + 'dotm': 'application/vnd.ms-word.template.macroenabled.12', + 'wps': 'application/vnd.ms-works', + 'wcm': 'application/vnd.ms-works', + 'wdb': 'application/vnd.ms-works', + 'wks': 'application/vnd.ms-works', + 'wpl': 'application/vnd.ms-wpl', + 'xps': 'application/vnd.ms-xpsdocument', + 'mseq': 'application/vnd.mseq', + 'mus': 'application/vnd.musician', + 'msty': 'application/vnd.muvee.style', + 'taglet': 'application/vnd.mynfc', + 'nlu': 'application/vnd.neurolanguage.nlu', + 'ntf': 'application/vnd.nitf', + 'nitf': 'application/vnd.nitf', + 'nnd': 'application/vnd.noblenet-directory', + 'nns': 'application/vnd.noblenet-sealer', + 'nnw': 'application/vnd.noblenet-web', + 'ngdat': 'application/vnd.nokia.n-gage.data', + 'n-gage': 'application/vnd.nokia.n-gage.symbian.install', + 'rpst': 'application/vnd.nokia.radio-preset', + 'rpss': 'application/vnd.nokia.radio-presets', + 'edm': 'application/vnd.novadigm.edm', + 'edx': 'application/vnd.novadigm.edx', + 'ext': 'application/vnd.novadigm.ext', + 'odc': 'application/vnd.oasis.opendocument.chart', + 'otc': 'application/vnd.oasis.opendocument.chart-template', + 'odb': 'application/vnd.oasis.opendocument.database', + 'odf': 'application/vnd.oasis.opendocument.formula', + 'odft': 'application/vnd.oasis.opendocument.formula-template', + 'odg': 'application/vnd.oasis.opendocument.graphics', + 'otg': 'application/vnd.oasis.opendocument.graphics-template', + 'odi': 'application/vnd.oasis.opendocument.image', + 'oti': 'application/vnd.oasis.opendocument.image-template', + 'odp': 'application/vnd.oasis.opendocument.presentation', + 'otp': 'application/vnd.oasis.opendocument.presentation-template', + 'ods': 'application/vnd.oasis.opendocument.spreadsheet', + 'ots': 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt': 'application/vnd.oasis.opendocument.text', + 'odm': 'application/vnd.oasis.opendocument.text-master', + 'ott': 'application/vnd.oasis.opendocument.text-template', + 'oth': 'application/vnd.oasis.opendocument.text-web', + 'xo': 'application/vnd.olpc-sugar', + 'dd2': 'application/vnd.oma.dd2+xml', + 'oxt': 'application/vnd.openofficeorg.extension', + 'pptx': + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx': 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'ppsx': + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'potx': + 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx': + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'docx': + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx': + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'mgp': 'application/vnd.osgeo.mapguide.package', + 'dp': 'application/vnd.osgi.dp', + 'esa': 'application/vnd.osgi.subsystem', + 'pdb': 'application/vnd.palm', + 'oprc': 'application/vnd.palm', + 'pqa': 'application/vnd.palm', + 'paw': 'application/vnd.pawaafile', + 'str': 'application/vnd.pg.format', + 'ei6': 'application/vnd.pg.osasli', + 'efif': 'application/vnd.picsel', + 'wg': 'application/vnd.pmi.widget', + 'plf': 'application/vnd.pocketlearn', + 'pbd': 'application/vnd.powerbuilder6', + 'box': 'application/vnd.previewsystems.box', + 'mgz': 'application/vnd.proteus.magazine', + 'qps': 'application/vnd.publishare-delta-tree', + 'ptid': 'application/vnd.pvi.ptid1', + 'qxd': 'application/vnd.quark.quarkxpress', + 'qwd': 'application/vnd.quark.quarkxpress', + 'qwt': 'application/vnd.quark.quarkxpress', + 'qxb': 'application/vnd.quark.quarkxpress', + 'qxl': 'application/vnd.quark.quarkxpress', + 'qxt': 'application/vnd.quark.quarkxpress', + 'bed': 'application/vnd.realvnc.bed', + 'mxl': 'application/vnd.recordare.musicxml', + 'musicxml': 'application/vnd.recordare.musicxml+xml', + 'cryptonote': 'application/vnd.rig.cryptonote', + 'cod': 'application/vnd.rim.cod', + 'rm': 'application/vnd.rn-realmedia', + 'rmvb': 'application/vnd.rn-realmedia-vbr', + 'link66': 'application/vnd.route66.link66+xml', + 'st': 'application/vnd.sailingtracker.track', + 'see': 'application/vnd.seemail', + 'sema': 'application/vnd.sema', + 'semd': 'application/vnd.semd', + 'semf': 'application/vnd.semf', + 'ifm': 'application/vnd.shana.informed.formdata', + 'itp': 'application/vnd.shana.informed.formtemplate', + 'iif': 'application/vnd.shana.informed.interchange', + 'ipk': 'application/vnd.shana.informed.package', + 'twd': 'application/vnd.simtech-mindmapper', + 'twds': 'application/vnd.simtech-mindmapper', + 'mmf': 'application/vnd.smaf', + 'teacher': 'application/vnd.smart.teacher', + 'sdkm': 'application/vnd.solent.sdkm+xml', + 'sdkd': 'application/vnd.solent.sdkm+xml', + 'dxp': 'application/vnd.spotfire.dxp', + 'sfs': 'application/vnd.spotfire.sfs', + 'sdc': 'application/vnd.stardivision.calc', + 'sda': 'application/vnd.stardivision.draw', + 'sdd': 'application/vnd.stardivision.impress', + 'smf': 'application/vnd.stardivision.math', + 'sdw': 'application/vnd.stardivision.writer', + 'vor': 'application/vnd.stardivision.writer', + 'sgl': 'application/vnd.stardivision.writer-global', + 'smzip': 'application/vnd.stepmania.package', + 'sm': 'application/vnd.stepmania.stepchart', + 'sxc': 'application/vnd.sun.xml.calc', + 'stc': 'application/vnd.sun.xml.calc.template', + 'sxd': 'application/vnd.sun.xml.draw', + 'std': 'application/vnd.sun.xml.draw.template', + 'sxi': 'application/vnd.sun.xml.impress', + 'sti': 'application/vnd.sun.xml.impress.template', + 'sxm': 'application/vnd.sun.xml.math', + 'sxw': 'application/vnd.sun.xml.writer', + 'sxg': 'application/vnd.sun.xml.writer.global', + 'stw': 'application/vnd.sun.xml.writer.template', + 'sus': 'application/vnd.sus-calendar', + 'susp': 'application/vnd.sus-calendar', + 'svd': 'application/vnd.svd', + 'sis': 'application/vnd.symbian.install', + 'sisx': 'application/vnd.symbian.install', + 'xsm': 'application/vnd.syncml+xml', + 'bdm': 'application/vnd.syncml.dm+wbxml', + 'xdm': 'application/vnd.syncml.dm+xml', + 'tao': 'application/vnd.tao.intent-module-archive', + 'pcap': 'application/vnd.tcpdump.pcap', + 'cap': 'application/vnd.tcpdump.pcap', + 'dmp': 'application/vnd.tcpdump.pcap', + 'tmo': 'application/vnd.tmobile-livetv', + 'tpt': 'application/vnd.trid.tpt', + 'mxs': 'application/vnd.triscape.mxs', + 'tra': 'application/vnd.trueapp', + 'ufd': 'application/vnd.ufdl', + 'ufdl': 'application/vnd.ufdl', + 'utz': 'application/vnd.uiq.theme', + 'umj': 'application/vnd.umajin', + 'unityweb': 'application/vnd.unity', + 'uoml': 'application/vnd.uoml+xml', + 'vcx': 'application/vnd.vcx', + 'vsd': 'application/vnd.visio', + 'vss': 'application/vnd.visio', + 'vst': 'application/vnd.visio', + 'vsw': 'application/vnd.visio', + 'vis': 'application/vnd.visionary', + 'vsf': 'application/vnd.vsf', + 'wbxml': 'application/vnd.wap.wbxml', + 'wmlc': 'application/vnd.wap.wmlc', + 'wmlsc': 'application/vnd.wap.wmlscriptc', + 'wtb': 'application/vnd.webturbo', + 'nbp': 'application/vnd.wolfram.player', + 'wpd': 'application/vnd.wordperfect', + 'wqd': 'application/vnd.wqd', + 'stf': 'application/vnd.wt.stf', + 'xar': 'application/vnd.xara', + 'xfdl': 'application/vnd.xfdl', + 'hvd': 'application/vnd.yamaha.hv-dic', + 'hvs': 'application/vnd.yamaha.hv-script', + 'hvp': 'application/vnd.yamaha.hv-voice', + 'osf': 'application/vnd.yamaha.openscoreformat', + 'osfpvg': 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'saf': 'application/vnd.yamaha.smaf-audio', + 'spf': 'application/vnd.yamaha.smaf-phrase', + 'cmp': 'application/vnd.yellowriver-custom-menu', + 'zir': 'application/vnd.zul', + 'zirz': 'application/vnd.zul', + 'zaz': 'application/vnd.zzazz.deck+xml', + 'vxml': 'application/voicexml+xml', + 'wasm': 'application/wasm', + 'wgt': 'application/widget', + 'hlp': 'application/winhlp', + 'wsdl': 'application/wsdl+xml', + 'wspolicy': 'application/wspolicy+xml', + '7z': 'application/x-7z-compressed', + 'abw': 'application/x-abiword', + 'ace': 'application/x-ace-compressed', + 'dmg': 'application/x-apple-diskimage', + 'aab': 'application/x-authorware-bin', + 'u32': 'application/x-authorware-bin', + 'vox': 'application/x-authorware-bin', + 'x32': 'application/x-authorware-bin', + 'aam': 'application/x-authorware-map', + 'aas': 'application/x-authorware-seg', + 'bcpio': 'application/x-bcpio', + 'torrent': 'application/x-bittorrent', + 'blb': 'application/x-blorb', + 'blorb': 'application/x-blorb', + 'bz': 'application/x-bzip', + 'bz2': 'application/x-bzip2', + 'boz': 'application/x-bzip2', + 'cbr': 'application/x-cbr', + 'cb7': 'application/x-cbr', + 'cba': 'application/x-cbr', + 'cbt': 'application/x-cbr', + 'cbz': 'application/x-cbr', + 'vcd': 'application/x-cdlink', + 'cfs': 'application/x-cfs-compressed', + 'chat': 'application/x-chat', + 'pgn': 'application/x-chess-pgn', + 'nsc': 'application/x-conference', + 'cpio': 'application/x-cpio', + 'csh': 'application/x-csh', + 'deb': 'application/x-debian-package', + 'udeb': 'application/x-debian-package', + 'dgc': 'application/x-dgc-compressed', + 'dir': 'application/x-director', + 'cct': 'application/x-director', + 'cst': 'application/x-director', + 'cxt': 'application/x-director', + 'dcr': 'application/x-director', + 'dxr': 'application/x-director', + 'fgd': 'application/x-director', + 'swa': 'application/x-director', + 'w3d': 'application/x-director', + 'wad': 'application/x-doom', + 'ncx': 'application/x-dtbncx+xml', + 'dtb': 'application/x-dtbook+xml', + 'res': 'application/x-dtbresource+xml', + 'dvi': 'application/x-dvi', + 'evy': 'application/x-envoy', + 'eva': 'application/x-eva', + 'bdf': 'application/x-font-bdf', + 'gsf': 'application/x-font-ghostscript', + 'psf': 'application/x-font-linux-psf', + 'pcf': 'application/x-font-pcf', + 'snf': 'application/x-font-snf', + 'pfa': 'application/x-font-type1', + 'afm': 'application/x-font-type1', + 'pfb': 'application/x-font-type1', + 'pfm': 'application/x-font-type1', + 'arc': 'application/x-freearc', + 'spl': 'application/x-futuresplash', + 'gca': 'application/x-gca-compressed', + 'ulx': 'application/x-glulx', + 'gnumeric': 'application/x-gnumeric', + 'gramps': 'application/x-gramps-xml', + 'gtar': 'application/x-gtar', + 'hdf': 'application/x-hdf', + 'install': 'application/x-install-instructions', + 'iso': 'application/x-iso9660-image', + 'jnlp': 'application/x-java-jnlp-file', + 'latex': 'application/x-latex', + 'lzh': 'application/x-lzh-compressed', + 'lha': 'application/x-lzh-compressed', + 'mie': 'application/x-mie', + 'prc': 'application/x-mobipocket-ebook', + 'mobi': 'application/x-mobipocket-ebook', + 'application': 'application/x-ms-application', + 'lnk': 'application/x-ms-shortcut', + 'wmd': 'application/x-ms-wmd', + 'wmz': 'application/x-ms-wmz', + 'xbap': 'application/x-ms-xbap', + 'mdb': 'application/x-msaccess', + 'obd': 'application/x-msbinder', + 'crd': 'application/x-mscardfile', + 'clp': 'application/x-msclip', + 'exe': 'application/x-msdownload', + 'bat': 'application/x-msdownload', + 'com': 'application/x-msdownload', + 'dll': 'application/x-msdownload', + 'msi': 'application/x-msdownload', + 'mvb': 'application/x-msmediaview', + 'm13': 'application/x-msmediaview', + 'm14': 'application/x-msmediaview', + 'wmf': 'application/x-msmetafile', + 'emf': 'application/x-msmetafile', + 'emz': 'application/x-msmetafile', + 'mny': 'application/x-msmoney', + 'pub': 'application/x-mspublisher', + 'scd': 'application/x-msschedule', + 'trm': 'application/x-msterminal', + 'wri': 'application/x-mswrite', + 'nc': 'application/x-netcdf', + 'cdf': 'application/x-netcdf', + 'nzb': 'application/x-nzb', + 'p12': 'application/x-pkcs12', + 'pfx': 'application/x-pkcs12', + 'p7b': 'application/x-pkcs7-certificates', + 'spc': 'application/x-pkcs7-certificates', + 'p7r': 'application/x-pkcs7-certreqresp', + 'rar': 'application/x-rar-compressed', + 'ris': 'application/x-research-info-systems', + 'sh': 'application/x-sh', + 'shar': 'application/x-shar', + 'swf': 'application/x-shockwave-flash', + 'xap': 'application/x-silverlight-app', + 'sql': 'application/x-sql', + 'sit': 'application/x-stuffit', + 'sitx': 'application/x-stuffitx', + 'srt': 'application/x-subrip', + 'sv4cpio': 'application/x-sv4cpio', + 'sv4crc': 'application/x-sv4crc', + 't3': 'application/x-t3vm-image', + 'gam': 'application/x-tads', + 'tar': 'application/x-tar', + 'tcl': 'application/x-tcl', + 'tex': 'application/x-tex', + 'tfm': 'application/x-tex-tfm', + 'texinfo': 'application/x-texinfo', + 'texi': 'application/x-texinfo', + 'obj': 'application/x-tgif', + 'ustar': 'application/x-ustar', + 'src': 'application/x-wais-source', + 'der': 'application/x-x509-ca-cert', + 'crt': 'application/x-x509-ca-cert', + 'fig': 'application/x-xfig', + 'xlf': 'application/x-xliff+xml', + 'xpi': 'application/x-xpinstall', + 'xz': 'application/x-xz', + 'z1': 'application/x-zmachine', + 'z2': 'application/x-zmachine', + 'z3': 'application/x-zmachine', + 'z4': 'application/x-zmachine', + 'z5': 'application/x-zmachine', + 'z6': 'application/x-zmachine', + 'z7': 'application/x-zmachine', + 'z8': 'application/x-zmachine', + 'xaml': 'application/xaml+xml', + 'xdf': 'application/xcap-diff+xml', + 'xenc': 'application/xenc+xml', + 'xhtml': 'application/xhtml+xml', + 'xht': 'application/xhtml+xml', + 'xml': 'application/xml', + 'xsl': 'application/xml', + 'dtd': 'application/xml-dtd', + 'xop': 'application/xop+xml', + 'xpl': 'application/xproc+xml', + 'xslt': 'application/xslt+xml', + 'xspf': 'application/xspf+xml', + 'mxml': 'application/xv+xml', + 'xhvml': 'application/xv+xml', + 'xvm': 'application/xv+xml', + 'xvml': 'application/xv+xml', + 'yang': 'application/yang', + 'yin': 'application/yin+xml', + 'zip': 'application/zip', + 'aac': 'audio/aac', + 'adp': 'audio/adpcm', + 'au': 'audio/basic', + 'snd': 'audio/basic', + 'mid': 'audio/midi', + 'kar': 'audio/midi', + 'midi': 'audio/midi', + 'rmi': 'audio/midi', + 'm4a': 'audio/mp4', + 'mp4a': 'audio/mp4', + 'mp3': 'audio/mpeg', + 'm2a': 'audio/mpeg', + 'm3a': 'audio/mpeg', + 'mp2': 'audio/mpeg', + 'mp2a': 'audio/mpeg', + 'mpga': 'audio/mpeg', + 'ogg': 'audio/ogg', + 'oga': 'audio/ogg', + 'opus': 'audio/ogg', + 'spx': 'audio/ogg', + 's3m': 'audio/s3m', + 'sil': 'audio/silk', + 'uva': 'audio/vnd.dece.audio', + 'uvva': 'audio/vnd.dece.audio', + 'eol': 'audio/vnd.digital-winds', + 'dra': 'audio/vnd.dra', + 'dts': 'audio/vnd.dts', + 'dtshd': 'audio/vnd.dts.hd', + 'lvp': 'audio/vnd.lucent.voice', + 'pya': 'audio/vnd.ms-playready.media.pya', + 'ecelp4800': 'audio/vnd.nuera.ecelp4800', + 'ecelp7470': 'audio/vnd.nuera.ecelp7470', + 'ecelp9600': 'audio/vnd.nuera.ecelp9600', + 'rip': 'audio/vnd.rip', + 'weba': 'audio/webm', + 'aif': 'audio/x-aiff', + 'aifc': 'audio/x-aiff', + 'aiff': 'audio/x-aiff', + 'caf': 'audio/x-caf', + 'flac': 'audio/x-flac', + 'mka': 'audio/x-matroska', + 'm3u': 'audio/x-mpegurl', + 'wax': 'audio/x-ms-wax', + 'wma': 'audio/x-ms-wma', + 'ram': 'audio/x-pn-realaudio', + 'ra': 'audio/x-pn-realaudio', + 'rmp': 'audio/x-pn-realaudio-plugin', + 'wav': 'audio/x-wav', + 'xm': 'audio/xm', + 'cdx': 'chemical/x-cdx', + 'cif': 'chemical/x-cif', + 'cmdf': 'chemical/x-cmdf', + 'cml': 'chemical/x-cml', + 'csml': 'chemical/x-csml', + 'xyz': 'chemical/x-xyz', + 'ttc': 'font/collection', + 'otf': 'font/otf', + 'ttf': 'font/ttf', + 'woff': 'font/woff', + 'woff2': 'font/woff2', + 'avif': 'image/avif', + 'bmp': 'image/bmp', + 'cgm': 'image/cgm', + 'g3': 'image/g3fax', + 'gif': 'image/gif', + 'heic': 'image/heic', + 'heif': 'image/heif', + 'ief': 'image/ief', + 'jpg': 'image/jpeg', + 'jpe': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'jxl': 'image/jxl', + 'ktx': 'image/ktx', + 'png': 'image/png', + 'btif': 'image/prs.btif', + 'sgi': 'image/sgi', + 'svg': 'image/svg+xml', + 'svgz': 'image/svg+xml', + 'tiff': 'image/tiff', + 'tif': 'image/tiff', + 'psd': 'image/vnd.adobe.photoshop', + 'uvi': 'image/vnd.dece.graphic', + 'uvg': 'image/vnd.dece.graphic', + 'uvvg': 'image/vnd.dece.graphic', + 'uvvi': 'image/vnd.dece.graphic', + 'djvu': 'image/vnd.djvu', + 'djv': 'image/vnd.djvu', + 'sub': 'image/vnd.dvb.subtitle', + 'dwg': 'image/vnd.dwg', + 'dxf': 'image/vnd.dxf', + 'fbs': 'image/vnd.fastbidsheet', + 'fpx': 'image/vnd.fpx', + 'fst': 'image/vnd.fst', + 'mmr': 'image/vnd.fujixerox.edmics-mmr', + 'rlc': 'image/vnd.fujixerox.edmics-rlc', + 'mdi': 'image/vnd.ms-modi', + 'wdp': 'image/vnd.ms-photo', + 'npx': 'image/vnd.net-fpx', + 'wbmp': 'image/vnd.wap.wbmp', + 'xif': 'image/vnd.xiff', + 'webp': 'image/webp', + '3ds': 'image/x-3ds', + 'ras': 'image/x-cmu-raster', + 'cmx': 'image/x-cmx', + 'fh': 'image/x-freehand', + 'fh4': 'image/x-freehand', + 'fh5': 'image/x-freehand', + 'fh7': 'image/x-freehand', + 'fhc': 'image/x-freehand', + 'ico': 'image/x-icon', + 'sid': 'image/x-mrsid-image', + 'pcx': 'image/x-pcx', + 'pic': 'image/x-pict', + 'pct': 'image/x-pict', + 'pnm': 'image/x-portable-anymap', + 'pbm': 'image/x-portable-bitmap', + 'pgm': 'image/x-portable-graymap', + 'ppm': 'image/x-portable-pixmap', + 'rgb': 'image/x-rgb', + 'tga': 'image/x-tga', + 'xbm': 'image/x-xbitmap', + 'xpm': 'image/x-xpixmap', + 'xwd': 'image/x-xwindowdump', + 'eml': 'message/rfc822', + 'mime': 'message/rfc822', + 'gltf': 'model/gltf+json', + 'glb': 'model/gltf-binary', + 'igs': 'model/iges', + 'iges': 'model/iges', + 'msh': 'model/mesh', + 'mesh': 'model/mesh', + 'silo': 'model/mesh', + 'dae': 'model/vnd.collada+xml', + 'dwf': 'model/vnd.dwf', + 'gdl': 'model/vnd.gdl', + 'gtw': 'model/vnd.gtw', + 'vtu': 'model/vnd.vtu', + 'vrml': 'model/vrml', + 'wrl': 'model/vrml', + 'x3db': 'model/x3d+binary', + 'x3dbz': 'model/x3d+binary', + 'x3dv': 'model/x3d+vrml', + 'x3dvz': 'model/x3d+vrml', + 'x3d': 'model/x3d+xml', + 'x3dz': 'model/x3d+xml', + 'appcache': 'text/cache-manifest', + 'ics': 'text/calendar', + 'ifb': 'text/calendar', + 'css': 'text/css', + 'csv': 'text/csv', + 'html': 'text/html', + 'htm': 'text/html', + 'js': 'text/javascript', + 'mjs': 'text/javascript', + 'md': 'text/markdown', + 'markdown': 'text/markdown', + 'n3': 'text/n3', + 'txt': 'text/plain', + 'conf': 'text/plain', + 'def': 'text/plain', + 'in': 'text/plain', + 'list': 'text/plain', + 'log': 'text/plain', + 'text': 'text/plain', + 'dsc': 'text/prs.lines.tag', + 'rtx': 'text/richtext', + 'sgml': 'text/sgml', + 'sgm': 'text/sgml', + 'tsv': 'text/tab-separated-values', + 't': 'text/troff', + 'man': 'text/troff', + 'me': 'text/troff', + 'ms': 'text/troff', + 'roff': 'text/troff', + 'tr': 'text/troff', + 'ttl': 'text/turtle', + 'uri': 'text/uri-list', + 'uris': 'text/uri-list', + 'urls': 'text/uri-list', + 'vcard': 'text/vcard', + 'curl': 'text/vnd.curl', + 'dcurl': 'text/vnd.curl.dcurl', + 'mcurl': 'text/vnd.curl.mcurl', + 'scurl': 'text/vnd.curl.scurl', + 'fly': 'text/vnd.fly', + 'flx': 'text/vnd.fmi.flexstor', + 'gv': 'text/vnd.graphviz', + '3dml': 'text/vnd.in3d.3dml', + 'spot': 'text/vnd.in3d.spot', + 'jad': 'text/vnd.sun.j2me.app-descriptor', + 'wml': 'text/vnd.wap.wml', + 'wmls': 'text/vnd.wap.wmlscript', + 'asm': 'text/x-asm', + 's': 'text/x-asm', + 'c': 'text/x-c', + 'cc': 'text/x-c', + 'cpp': 'text/x-c', + 'cxx': 'text/x-c', + 'dic': 'text/x-c', + 'h': 'text/x-c', + 'hh': 'text/x-c', + 'dart': 'text/x-dart', + 'f': 'text/x-fortran', + 'f77': 'text/x-fortran', + 'f90': 'text/x-fortran', + 'for': 'text/x-fortran', + 'java': 'text/x-java-source', + 'nfo': 'text/x-nfo', + 'opml': 'text/x-opml', + 'pas': 'text/x-pascal', + 'p': 'text/x-pascal', + 'etx': 'text/x-setext', + 'sfv': 'text/x-sfv', + 'uu': 'text/x-uuencode', + 'vcs': 'text/x-vcalendar', + 'vcf': 'text/x-vcard', + '3gp': 'video/3gpp', + '3g2': 'video/3gpp2', + 'h261': 'video/h261', + 'h263': 'video/h263', + 'h264': 'video/h264', + 'jpgv': 'video/jpeg', + 'jpm': 'video/jpm', + 'jpgm': 'video/jpm', + 'mj2': 'video/mj2', + 'mjp2': 'video/mj2', + 'ts': 'video/mp2t', + 'm2t': 'video/mp2t', + 'm2ts': 'video/mp2t', + 'mts': 'video/mp2t', + 'mp4': 'video/mp4', + 'mp4v': 'video/mp4', + 'mpg4': 'video/mp4', + 'mpg': 'video/mpeg', + 'm1v': 'video/mpeg', + 'm2v': 'video/mpeg', + 'mpe': 'video/mpeg', + 'mpeg': 'video/mpeg', + 'ogv': 'video/ogg', + 'mov': 'video/quicktime', + 'qt': 'video/quicktime', + 'uvh': 'video/vnd.dece.hd', + 'uvvh': 'video/vnd.dece.hd', + 'uvm': 'video/vnd.dece.mobile', + 'uvvm': 'video/vnd.dece.mobile', + 'uvp': 'video/vnd.dece.pd', + 'uvvp': 'video/vnd.dece.pd', + 'uvs': 'video/vnd.dece.sd', + 'uvvs': 'video/vnd.dece.sd', + 'uvv': 'video/vnd.dece.video', + 'uvvv': 'video/vnd.dece.video', + 'dvb': 'video/vnd.dvb.file', + 'fvt': 'video/vnd.fvt', + 'mxu': 'video/vnd.mpegurl', + 'm4u': 'video/vnd.mpegurl', + 'pyv': 'video/vnd.ms-playready.media.pyv', + 'uvu': 'video/vnd.uvvu.mp4', + 'uvvu': 'video/vnd.uvvu.mp4', + 'viv': 'video/vnd.vivo', + 'webm': 'video/webm', + 'f4v': 'video/x-f4v', + 'fli': 'video/x-fli', + 'flv': 'video/x-flv', + 'm4v': 'video/x-m4v', + 'mkv': 'video/x-matroska', + 'mk3d': 'video/x-matroska', + 'mks': 'video/x-matroska', + 'mng': 'video/x-mng', + 'asf': 'video/x-ms-asf', + 'asx': 'video/x-ms-asf', + 'vob': 'video/x-ms-vob', + 'wm': 'video/x-ms-wm', + 'wmv': 'video/x-ms-wmv', + 'wmx': 'video/x-ms-wmx', + 'wvx': 'video/x-ms-wvx', + 'avi': 'video/x-msvideo', + 'movie': 'video/x-sgi-movie', + 'smv': 'video/x-smv', + 'ice': 'x-conference/x-cooltalk', +}; diff --git a/pkgs/mime/pubspec.yaml b/pkgs/mime/pubspec.yaml index 31ac74885f..2c43217d90 100644 --- a/pkgs/mime/pubspec.yaml +++ b/pkgs/mime/pubspec.yaml @@ -1,5 +1,5 @@ name: mime -version: 2.0.0 +version: 2.1.0-wip description: >- Utilities for handling media (MIME) types, including determining a type from a file extension and file contents. @@ -17,4 +17,6 @@ environment: dev_dependencies: dart_flutter_team_lints: ^3.0.0 + http: ^1.5.0 + path: ^1.9.0 test: ^1.16.0 diff --git a/pkgs/mime/test/mime_type_test.dart b/pkgs/mime/test/mime_type_test.dart index 23cb34af30..db9e75fa04 100644 --- a/pkgs/mime/test/mime_type_test.dart +++ b/pkgs/mime/test/mime_type_test.dart @@ -48,7 +48,6 @@ void main() { _expectMimeType('file.ogg', 'audio/ogg'); _expectMimeType('file.aiff', 'audio/x-aiff'); _expectMimeType('file.m4a', 'audio/mp4'); - _expectMimeType('file.m4b', 'audio/mp4'); _expectMimeType('file.toml', 'application/toml'); _expectMimeType('file.md', 'text/markdown'); _expectMimeType('file.markdown', 'text/markdown'); @@ -317,4 +316,17 @@ void main() { expect(initialMagicNumbersMaxLength, actualMaxBytes); }); + + test('magic numbers in mime table', () { + final magicMimes = initialMagicNumbers.map((magic) => magic.mimeType); + + for (final mime in magicMimes) { + // TODO: We'll need to remove or rename audio/weba; it's not a mime type. + expect( + extensionFromMime(mime), + isNotNull, + reason: 'magic number mime $mime missing from mime table', + ); + } + }); } diff --git a/pkgs/mime/third_party/httpd/LICENSE b/pkgs/mime/third_party/httpd/LICENSE new file mode 100644 index 0000000000..9c59479d65 --- /dev/null +++ b/pkgs/mime/third_party/httpd/LICENSE @@ -0,0 +1,537 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +APACHE HTTP SERVER SUBCOMPONENTS: + +The Apache HTTP Server includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +For the mod_mime_magic component: + +/* + * mod_mime_magic: MIME type lookup via file magic numbers + * Copyright (c) 1996-1997 Cisco Systems, Inc. + * + * This software was submitted by Cisco Systems to the Apache Group in July + * 1997. Future revisions and derivatives of this source code must + * acknowledge Cisco Systems as the original contributor of this module. + * All other licensing and usage conditions are those of the Apache Group. + * + * Some of this code is derived from the free version of the file command + * originally posted to comp.sources.unix. Copyright info for that program + * is included below as required. + * --------------------------------------------------------------------------- + * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone and + * Telegraph Company or of the Regents of the University of California. + * + * Permission is granted to anyone to use this software for any purpose on any + * computer system, and to alter it and redistribute it freely, subject to + * the following restrictions: + * + * 1. The author is not responsible for the consequences of use of this + * software, no matter how awful, even if they arise from flaws in it. + * + * 2. The origin of this software must not be misrepresented, either by + * explicit claim or by omission. Since few users ever read sources, credits + * must appear in the documentation. + * + * 3. Altered versions must be plainly marked as such, and must not be + * misrepresented as being the original software. Since few users ever read + * sources, credits must appear in the documentation. + * + * 4. This notice may not be removed or altered. + * ------------------------------------------------------------------------- + * + */ + + +For the modules\mappers\mod_imagemap.c component: + + "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com + +For the server\util_md5.c component: + +/************************************************************************ + * NCSA HTTPd Server + * Software Development Group + * National Center for Supercomputing Applications + * University of Illinois at Urbana-Champaign + * 605 E. Springfield, Champaign, IL 61820 + * httpd@ncsa.uiuc.edu + * + * Copyright (C) 1995, Board of Trustees of the University of Illinois + * + ************************************************************************ + * + * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code + * + * Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc. + * Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon + * University (see Copyright below). + * Portions of Content-MD5 code Copyright (C) 1991 Bell Communications + * Research, Inc. (Bellcore) (see Copyright below). + * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu + * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) + * + */ + + +/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ +/* (C) Copyright 1993,1994 by Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Carnegie + * Mellon University not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. Carnegie Mellon University makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* + * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) + * + * Permission to use, copy, modify, and distribute this material + * for any purpose and without fee is hereby granted, provided + * that the above copyright notice and this permission notice + * appear in all copies, and that the name of Bellcore not be + * used in advertising or publicity pertaining to this + * material without the specific, prior written permission + * of an authorized representative of Bellcore. BELLCORE + * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY + * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + */ + + +For the util_pcre.c and ap_regex.h components: + + Copyright (c) 1997-2004 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- + + +For the srclib\apr\include\apr_md5.h component: +/* + * This is work is derived from material Copyright RSA Data Security, Inc. + * + * The RSA copyright statement and Licence for that original material is + * included below. This is followed by the Apache copyright statement and + * licence for the modifications made to that material. + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. + */ + +For the srclib\apr\passwd\apr_md5.c component: + +/* + * This is work is derived from material Copyright RSA Data Security, Inc. + * + * The RSA copyright statement and Licence for that original material is + * included below. This is followed by the Apache copyright statement and + * licence for the modifications made to that material. + */ + +/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. + */ +/* + * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 + * MD5 crypt() function, which is licenced as follows: + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp + * ---------------------------------------------------------------------------- + */ + +For the srclib\apr-util\crypto\apr_md4.c component: + + * This is derived from material copyright RSA Data Security, Inc. + * Their notice is reproduced below in its entirety. + * + * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + * rights reserved. + * + * License to copy and use this software is granted provided that it + * is identified as the "RSA Data Security, Inc. MD4 Message-Digest + * Algorithm" in all material mentioning or referencing this software + * or this function. + * + * License is also granted to make and use derivative works provided + * that such works are identified as "derived from the RSA Data + * Security, Inc. MD4 Message-Digest Algorithm" in all material + * mentioning or referencing the derived work. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + +For the srclib\apr-util\include\apr_md4.h component: + + * + * This is derived from material copyright RSA Data Security, Inc. + * Their notice is reproduced below in its entirety. + * + * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + * rights reserved. + * + * License to copy and use this software is granted provided that it + * is identified as the "RSA Data Security, Inc. MD4 Message-Digest + * Algorithm" in all material mentioning or referencing this software + * or this function. + * + * License is also granted to make and use derivative works provided + * that such works are identified as "derived from the RSA Data + * Security, Inc. MD4 Message-Digest Algorithm" in all material + * mentioning or referencing the derived work. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + + +For the srclib\apr-util\test\testmd4.c component: + + * + * This is derived from material copyright RSA Data Security, Inc. + * Their notice is reproduced below in its entirety. + * + * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All + * rights reserved. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + +For the test\zb.c component: + +/* ZeusBench V1.01 + =============== + +This program is Copyright (C) Zeus Technology Limited 1996. + +This program may be used and copied freely providing this copyright notice +is not removed. + +This software is provided "as is" and any express or implied warranties, +including but not limited to, the implied warranties of merchantability and +fitness for a particular purpose are disclaimed. In no event shall +Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, +exemplary, or consequential damaged (including, but not limited to, +procurement of substitute good or services; loss of use, data, or profits; +or business interruption) however caused and on theory of liability. Whether +in contract, strict liability or tort (including negligence or otherwise) +arising in any way out of the use of this software, even if advised of the +possibility of such damage. + + Written by Adam Twiss (adam@zeus.co.uk). March 1996 + +Thanks to the following people for their input: + Mike Belshe (mbelshe@netscape.com) + Michael Campanella (campanella@stevms.enet.dec.com) + +*/ + diff --git a/pkgs/mime/third_party/httpd/README.md b/pkgs/mime/third_party/httpd/README.md new file mode 100644 index 0000000000..2eb77ee72c --- /dev/null +++ b/pkgs/mime/third_party/httpd/README.md @@ -0,0 +1,3 @@ +The mime types table from the Apache httpd project. + +The source repository is https://github.com/apache/httpd. diff --git a/pkgs/mime/third_party/httpd/mime.types b/pkgs/mime/third_party/httpd/mime.types new file mode 100644 index 0000000000..92ee7178aa --- /dev/null +++ b/pkgs/mime/third_party/httpd/mime.types @@ -0,0 +1,1859 @@ +# This file maps Internet media types to unique file extension(s). +# Although created for httpd, this file is used by many software systems +# and has been placed in the public domain for unlimited redistribution. +# +# The table below contains both registered and (common) unregistered types. +# A type that has no unique extension can be ignored -- they are listed +# here to guide configurations toward known types and to make it easier to +# identify "new" types. File extensions are also commonly used to indicate +# content languages and encodings, so choose them carefully. +# +# Internet media types should be registered as described in RFC 4288. +# The registry is at . +# +# MIME type (lowercased) Extensions +# ============================================ ========== +# application/1d-interleaved-parityfec +# application/3gpdash-qoe-report+xml +# application/3gpp-ims+xml +# application/a2l +# application/activemessage +# application/alto-costmap+json +# application/alto-costmapfilter+json +# application/alto-directory+json +# application/alto-endpointcost+json +# application/alto-endpointcostparams+json +# application/alto-endpointprop+json +# application/alto-endpointpropparams+json +# application/alto-error+json +# application/alto-networkmap+json +# application/alto-networkmapfilter+json +# application/aml +application/andrew-inset ez +# application/applefile +application/applixware aw +# application/atf +# application/atfx +application/atom+xml atom +application/atomcat+xml atomcat +# application/atomdeleted+xml +# application/atomicmail +application/atomsvc+xml atomsvc +# application/atxml +# application/auth-policy+xml +# application/bacnet-xdd+zip +# application/batch-smtp +# application/beep+xml +# application/calendar+json +# application/calendar+xml +# application/call-completion +# application/cals-1840 +# application/cbor +# application/ccmp+xml +application/ccxml+xml ccxml +# application/cdfx+xml +application/cdmi-capability cdmia +application/cdmi-container cdmic +application/cdmi-domain cdmid +application/cdmi-object cdmio +application/cdmi-queue cdmiq +# application/cdni +# application/cea +# application/cea-2018+xml +# application/cellml+xml +# application/cfw +# application/cms +# application/cnrp+xml +# application/coap-group+json +# application/commonground +# application/conference-info+xml +# application/cpl+xml +# application/csrattrs +# application/csta+xml +# application/cstadata+xml +# application/csvm+json +application/cu-seeme cu +# application/cybercash +# application/dash+xml +# application/dashdelta +application/davmount+xml davmount +# application/dca-rft +# application/dcd +# application/dec-dx +# application/dialog-info+xml +# application/dicom +# application/dii +# application/dit +# application/dns +application/docbook+xml dbk +# application/dskpp+xml +application/dssc+der dssc +application/dssc+xml xdssc +# application/dvcs +application/ecmascript ecma +# application/edi-consent +# application/edi-x12 +# application/edifact +# application/efi +# application/emergencycalldata.comment+xml +# application/emergencycalldata.deviceinfo+xml +# application/emergencycalldata.providerinfo+xml +# application/emergencycalldata.serviceinfo+xml +# application/emergencycalldata.subscriberinfo+xml +application/emma+xml emma +# application/emotionml+xml +# application/encaprtp +# application/epp+xml +application/epub+zip epub +# application/eshop +# application/example +application/exi exi +# application/fastinfoset +# application/fastsoap +# application/fdt+xml +# application/fits +application/font-tdpfr pfr +# application/framework-attributes+xml +# application/geo+json +application/gml+xml gml +application/gpx+xml gpx +application/gxf gxf +# application/gzip +# application/h224 +# application/held+xml +# application/http +application/hyperstudio stk +# application/ibe-key-request+xml +# application/ibe-pkg-reply+xml +# application/ibe-pp-data +# application/iges +# application/im-iscomposing+xml +# application/index +# application/index.cmd +# application/index.obj +# application/index.response +# application/index.vnd +application/inkml+xml ink inkml +# application/iotp +application/ipfix ipfix +# application/ipp +# application/isup +# application/its+xml +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +# application/javascript +# application/jose +# application/jose+json +# application/jrd+json +application/json json +# application/json-patch+json +# application/json-seq +application/jsonml+json jsonml +# application/jwk+json +# application/jwk-set+json +# application/jwt +# application/kpml-request+xml +# application/kpml-response+xml +# application/ld+json +# application/lgr+xml +# application/link-format +# application/load-control+xml +application/lost+xml lostxml +# application/lostsync+xml +# application/lxf +application/mac-binhex40 hqx +application/mac-compactpro cpt +# application/macwriteii +application/mads+xml mads +application/marc mrc +application/marcxml+xml mrcx +application/mathematica ma nb mb +application/mathml+xml mathml +# application/mathml-content+xml +# application/mathml-presentation+xml +# application/mbms-associated-procedure-description+xml +# application/mbms-deregister+xml +# application/mbms-envelope+xml +# application/mbms-msk+xml +# application/mbms-msk-response+xml +# application/mbms-protection-description+xml +# application/mbms-reception-report+xml +# application/mbms-register+xml +# application/mbms-register-response+xml +# application/mbms-schedule+xml +# application/mbms-user-service-description+xml +application/mbox mbox +# application/media-policy-dataset+xml +# application/media_control+xml +application/mediaservercontrol+xml mscml +# application/merge-patch+json +application/metalink+xml metalink +application/metalink4+xml meta4 +application/mets+xml mets +# application/mf4 +# application/mikey +application/mods+xml mods +# application/moss-keys +# application/moss-signature +# application/mosskey-data +# application/mosskey-request +application/mp21 m21 mp21 +application/mp4 mp4s +# application/mpeg4-generic +# application/mpeg4-iod +# application/mpeg4-iod-xmt +# application/mrb-consumer+xml +# application/mrb-publish+xml +# application/msc-ivr+xml +# application/msc-mixer+xml +application/msword doc dot +application/mxf mxf +# application/nasdata +# application/news-checkgroups +# application/news-groupinfo +# application/news-transmission +# application/nlsml+xml +# application/nss +# application/ocsp-request +# application/ocsp-response +application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy +application/oda oda +# application/odx +application/oebps-package+xml opf +application/ogg ogx +application/omdoc+xml omdoc +application/onenote onetoc onetoc2 onetmp onepkg +application/oxps oxps +# application/p2p-overlay+xml +# application/parityfec +application/patch-ops-error+xml xer +application/pdf pdf +# application/pdx +application/pgp-encrypted pgp +# application/pgp-keys +application/pgp-signature asc sig +application/pics-rules prf +# application/pidf+xml +# application/pidf-diff+xml +application/pkcs10 p10 +# application/pkcs12 +application/pkcs7-mime p7m p7c +application/pkcs7-signature p7s +application/pkcs8 p8 +application/pkix-attr-cert ac +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml pls +# application/poc-settings+xml +application/postscript ai eps ps +# application/ppsp-tracker+json +# application/problem+json +# application/problem+xml +# application/provenance+xml +# application/prs.alvestrand.titrax-sheet +application/prs.cww cww +# application/prs.hpub+zip +# application/prs.nprend +# application/prs.plucker +# application/prs.rdf-xml-crypt +# application/prs.xsf+xml +application/pskc+xml pskcxml +# application/qsig +# application/raptorfec +# application/rdap+json +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +# application/remote-printing +# application/reputon+json +application/resource-lists+xml rl +application/resource-lists-diff+xml rld +# application/rfc+xml +# application/riscos +# application/rlmi+xml +application/rls-services+xml rs +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-roa roa +# application/rpki-updown +application/rsd+xml rsd +application/rss+xml rss +application/rtf rtf +# application/rtploopback +# application/rtx +# application/samlassertion+xml +# application/samlmetadata+xml +application/sbml+xml sbml +# application/scaip+xml +# application/scim+json +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +# application/sep+xml +# application/sep-exi +# application/session-info +# application/set-payment +application/set-payment-initiation setpay +# application/set-registration +application/set-registration-initiation setreg +# application/sgml +# application/sgml-open-catalog +application/shf+xml shf +# application/sieve +# application/simple-filter+xml +# application/simple-message-summary +# application/simplesymbolcontainer +# application/slate +# application/smil +application/smil+xml smi smil +# application/smpte336m +# application/soap+fastinfoset +# application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +# application/spirits-event+xml +# application/sql +application/srgs gram +application/srgs+xml grxml +application/sru+xml sru +application/ssdl+xml ssdl +application/ssml+xml ssml +# application/tamp-apex-update +# application/tamp-apex-update-confirm +# application/tamp-community-update +# application/tamp-community-update-confirm +# application/tamp-error +# application/tamp-sequence-adjust +# application/tamp-sequence-adjust-confirm +# application/tamp-status-query +# application/tamp-status-response +# application/tamp-update +# application/tamp-update-confirm +application/tei+xml tei teicorpus +application/thraud+xml tfi +# application/timestamp-query +# application/timestamp-reply +application/timestamped-data tsd +# application/ttml+xml +# application/tve-trigger +# application/ulpfec +# application/urc-grpsheet+xml +# application/urc-ressheet+xml +# application/urc-targetdesc+xml +# application/urc-uisocketdesc+xml +# application/vcard+json +# application/vcard+xml +# application/vemmi +# application/vividence.scriptfile +# application/vnd.3gpp-prose+xml +# application/vnd.3gpp-prose-pc3ch+xml +# application/vnd.3gpp.access-transfer-events+xml +# application/vnd.3gpp.bsf+xml +# application/vnd.3gpp.mid-call+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +# application/vnd.3gpp.sms +# application/vnd.3gpp.sms+xml +# application/vnd.3gpp.srvcc-ext+xml +# application/vnd.3gpp.srvcc-info+xml +# application/vnd.3gpp.state-and-event-info+xml +# application/vnd.3gpp.ussd+xml +# application/vnd.3gpp2.bcmcsinfo+xml +# application/vnd.3gpp2.sms +application/vnd.3gpp2.tcap tcap +# application/vnd.3lightssoftware.imagescal +application/vnd.3m.post-it-notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.air-application-installer-package+zip air +# application/vnd.adobe.flash.movie +application/vnd.adobe.formscentral.fcdt fcdt +application/vnd.adobe.fxp fxp fxpl +# application/vnd.adobe.partial-upload +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +# application/vnd.aether.imp +# application/vnd.ah-barcode +application/vnd.ahead.space ahead +application/vnd.airzip.filesecure.azf azf +application/vnd.airzip.filesecure.azs azs +application/vnd.amazon.ebook azw +# application/vnd.amazon.mobi8-ebook +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +# application/vnd.amundsen.maze+xml +application/vnd.android.package-archive apk +# application/vnd.anki +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component atx +# application/vnd.apache.thrift.binary +# application/vnd.apache.thrift.compact +# application/vnd.apache.thrift.json +# application/vnd.api+json +application/vnd.apple.installer+xml mpkg +application/vnd.apple.mpegurl m3u8 +# application/vnd.arastra.swi +application/vnd.aristanetworks.swi swi +# application/vnd.artsquare +application/vnd.astraea-software.iota iota +application/vnd.audiograph aep +# application/vnd.autopackage +# application/vnd.avistar+xml +# application/vnd.balsamiq.bmml+xml +# application/vnd.balsamiq.bmpr +# application/vnd.bekitzur-stech+json +# application/vnd.biopax.rdf+xml +application/vnd.blueice.multipass mpm +# application/vnd.bluetooth.ep.oob +# application/vnd.bluetooth.le.oob +application/vnd.bmi bmi +application/vnd.businessobjects rep +# application/vnd.cab-jscript +# application/vnd.canon-cpdl +# application/vnd.canon-lips +# application/vnd.cendio.thinlinc.clientconf +# application/vnd.century-systems.tcp_stream +application/vnd.chemdraw+xml cdxml +# application/vnd.chess-pgn +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.cinderella cdy +# application/vnd.cirpack.isdn-ext +# application/vnd.citationstyles.style+xml +application/vnd.claymore cla +application/vnd.cloanto.rp9 rp9 +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.cluetrust.cartomobile-config c11amc +application/vnd.cluetrust.cartomobile-config-pkg c11amz +# application/vnd.coffeescript +# application/vnd.collection+json +# application/vnd.collection.doc+json +# application/vnd.collection.next+json +# application/vnd.comicbook+zip +# application/vnd.commerce-battelle +application/vnd.commonspace csp +application/vnd.contact.cmsg cdbcmsg +# application/vnd.coreos.ignition+json +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.ctc-posml pml +# application/vnd.ctct.ws+xml +# application/vnd.cups-pdf +# application/vnd.cups-postscript +application/vnd.cups-ppd ppd +# application/vnd.cups-raster +# application/vnd.cups-raw +# application/vnd.curl +application/vnd.curl.car car +application/vnd.curl.pcurl pcurl +# application/vnd.cyan.dean.root+xml +# application/vnd.cybank +application/vnd.dart dart +application/vnd.data-vision.rdz rdz +# application/vnd.debian.binary-package +application/vnd.dece.data uvf uvvf uvd uvvd +application/vnd.dece.ttml+xml uvt uvvt +application/vnd.dece.unspecified uvx uvvx +application/vnd.dece.zip uvz uvvz +application/vnd.denovo.fcselayout-link fe_launch +# application/vnd.desmume.movie +# application/vnd.dir-bi.plate-dl-nosuffix +# application/vnd.dm.delegation+xml +application/vnd.dna dna +# application/vnd.document+json +application/vnd.dolby.mlp mlp +# application/vnd.dolby.mobile.1 +# application/vnd.dolby.mobile.2 +# application/vnd.doremir.scorecloud-binary-document +application/vnd.dpgraph dpg +application/vnd.dreamfactory dfac +# application/vnd.drive+json +application/vnd.ds-keypoint kpxx +# application/vnd.dtg.local +# application/vnd.dtg.local.flash +# application/vnd.dtg.local.html +application/vnd.dvb.ait ait +# application/vnd.dvb.dvbj +# application/vnd.dvb.esgcontainer +# application/vnd.dvb.ipdcdftnotifaccess +# application/vnd.dvb.ipdcesgaccess +# application/vnd.dvb.ipdcesgaccess2 +# application/vnd.dvb.ipdcesgpdd +# application/vnd.dvb.ipdcroaming +# application/vnd.dvb.iptv.alfec-base +# application/vnd.dvb.iptv.alfec-enhancement +# application/vnd.dvb.notif-aggregate-root+xml +# application/vnd.dvb.notif-container+xml +# application/vnd.dvb.notif-generic+xml +# application/vnd.dvb.notif-ia-msglist+xml +# application/vnd.dvb.notif-ia-registration-request+xml +# application/vnd.dvb.notif-ia-registration-response+xml +# application/vnd.dvb.notif-init+xml +# application/vnd.dvb.pfr +application/vnd.dvb.service svc +# application/vnd.dxr +application/vnd.dynageo geo +# application/vnd.dzr +# application/vnd.easykaraoke.cdgdownload +# application/vnd.ecdis-update +application/vnd.ecowin.chart mag +# application/vnd.ecowin.filerequest +# application/vnd.ecowin.fileupdate +# application/vnd.ecowin.series +# application/vnd.ecowin.seriesrequest +# application/vnd.ecowin.seriesupdate +# application/vnd.emclient.accessrequest+xml +application/vnd.enliven nml +# application/vnd.enphase.envoy +# application/vnd.eprints.data+xml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +# application/vnd.ericsson.quickcall +application/vnd.eszigno3+xml es3 et3 +# application/vnd.etsi.aoc+xml +# application/vnd.etsi.asic-e+zip +# application/vnd.etsi.asic-s+zip +# application/vnd.etsi.cug+xml +# application/vnd.etsi.iptvcommand+xml +# application/vnd.etsi.iptvdiscovery+xml +# application/vnd.etsi.iptvprofile+xml +# application/vnd.etsi.iptvsad-bc+xml +# application/vnd.etsi.iptvsad-cod+xml +# application/vnd.etsi.iptvsad-npvr+xml +# application/vnd.etsi.iptvservice+xml +# application/vnd.etsi.iptvsync+xml +# application/vnd.etsi.iptvueprofile+xml +# application/vnd.etsi.mcid+xml +# application/vnd.etsi.mheg5 +# application/vnd.etsi.overload-control-policy-dataset+xml +# application/vnd.etsi.pstn+xml +# application/vnd.etsi.sci+xml +# application/vnd.etsi.simservs+xml +# application/vnd.etsi.timestamp-token +# application/vnd.etsi.tsl+xml +# application/vnd.etsi.tsl.der +# application/vnd.eudora.data +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +# application/vnd.f-secure.mobile +# application/vnd.fastcopy-disk-image +application/vnd.fdf fdf +application/vnd.fdsn.mseed mseed +application/vnd.fdsn.seed seed dataless +# application/vnd.ffsns +# application/vnd.filmit.zfc +# application/vnd.fints +# application/vnd.firemonkeys.cloudcell +application/vnd.flographit gph +application/vnd.fluxtime.clip ftc +# application/vnd.font-fontforge-sfd +application/vnd.framemaker fm frame maker book +application/vnd.frogans.fnc fnc +application/vnd.frogans.ltf ltf +application/vnd.fsc.weblaunch fsc +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +# application/vnd.fujixerox.art-ex +# application/vnd.fujixerox.art4 +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +# application/vnd.fujixerox.docuworks.container +# application/vnd.fujixerox.hbpl +# application/vnd.fut-misnet +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +# application/vnd.geo+json +# application/vnd.geocube+xml +application/vnd.geogebra.file ggb +application/vnd.geogebra.slides ggs +application/vnd.geogebra.tool ggt +application/vnd.geometry-explorer gex gre +application/vnd.geonext gxt +application/vnd.geoplan g2w +application/vnd.geospace g3w +# application/vnd.gerber +# application/vnd.globalplatform.card-content-mgt +# application/vnd.globalplatform.card-content-mgt-response +application/vnd.gmx gmx +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +# application/vnd.gov.sk.e-form+xml +# application/vnd.gov.sk.e-form+zip +# application/vnd.gov.sk.xmldatacontainer+xml +application/vnd.grafeq gqf gqs +# application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +# application/vnd.hal+json +application/vnd.hal+xml hal +application/vnd.handheld-entertainment+xml zmm +application/vnd.hbci hbci +# application/vnd.hcl-bireports +# application/vnd.hdt +# application/vnd.heroku+json +application/vnd.hhe.lesson-player les +application/vnd.hp-hpgl hpgl +application/vnd.hp-hpid hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-pcl pcl +application/vnd.hp-pclxl pclxl +# application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +# application/vnd.hyperdrive+json +# application/vnd.hzn-3d-crossword +# application/vnd.ibm.afplinedata +# application/vnd.ibm.electronic-media +application/vnd.ibm.minipay mpy +application/vnd.ibm.modcap afp listafp list3820 +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +# application/vnd.ieee.1905 +application/vnd.igloader igl +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +# application/vnd.ims.imsccv1p1 +# application/vnd.ims.imsccv1p2 +# application/vnd.ims.imsccv1p3 +# application/vnd.ims.lis.v2.result+json +# application/vnd.ims.lti.v2.toolconsumerprofile+json +# application/vnd.ims.lti.v2.toolproxy+json +# application/vnd.ims.lti.v2.toolproxy.id+json +# application/vnd.ims.lti.v2.toolsettings+json +# application/vnd.ims.lti.v2.toolsettings.simple+json +# application/vnd.informedcontrol.rms+xml +# application/vnd.informix-visionary +# application/vnd.infotech.project +# application/vnd.infotech.project+xml +# application/vnd.innopath.wamp.notification +application/vnd.insors.igm igm +application/vnd.intercon.formnet xpw xpx +application/vnd.intergeo i2g +# application/vnd.intertrust.digibox +# application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +# application/vnd.iptc.g2.catalogitem+xml +# application/vnd.iptc.g2.conceptitem+xml +# application/vnd.iptc.g2.knowledgeitem+xml +# application/vnd.iptc.g2.newsitem+xml +# application/vnd.iptc.g2.newsmessage+xml +# application/vnd.iptc.g2.packageitem+xml +# application/vnd.iptc.g2.planningitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.isac.fcs fcs +application/vnd.jam jam +# application/vnd.japannet-directory-service +# application/vnd.japannet-jpnstore-wakeup +# application/vnd.japannet-payment-wakeup +# application/vnd.japannet-registration +# application/vnd.japannet-registration-wakeup +# application/vnd.japannet-setstore-wakeup +# application/vnd.japannet-verification +# application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +# application/vnd.jsk.isdn-ngn +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.kinar kne knp +application/vnd.koan skp skd skt skm +application/vnd.kodak-descriptor sse +application/vnd.las.las+xml lasxml +# application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.lotus-1-2-3 123 +application/vnd.lotus-approach apr +application/vnd.lotus-freelance pre +application/vnd.lotus-notes nsf +application/vnd.lotus-organizer org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp +application/vnd.macports.portpkg portpkg +# application/vnd.mapbox-vector-tile +# application/vnd.marlin.drm.actiontoken+xml +# application/vnd.marlin.drm.conftoken+xml +# application/vnd.marlin.drm.license+xml +# application/vnd.marlin.drm.mdcf +# application/vnd.mason+json +# application/vnd.maxmind.maxmind-db +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +# application/vnd.meridian-slingshot +application/vnd.mfer mwf +application/vnd.mfmp mfm +# application/vnd.micro+json +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +# application/vnd.microsoft.portable-executable +# application/vnd.miele+json +application/vnd.mif mif +# application/vnd.minisoft-hp3000-save +# application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf daf +application/vnd.mobius.dis dis +application/vnd.mobius.mbk mbk +application/vnd.mobius.mqy mqy +application/vnd.mobius.msl msl +application/vnd.mobius.plc plc +application/vnd.mobius.txf txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +# application/vnd.motorola.flexsuite +# application/vnd.motorola.flexsuite.adsi +# application/vnd.motorola.flexsuite.fis +# application/vnd.motorola.flexsuite.gotap +# application/vnd.motorola.flexsuite.kmr +# application/vnd.motorola.flexsuite.ttc +# application/vnd.motorola.flexsuite.wem +# application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +# application/vnd.ms-3mfdocument +application/vnd.ms-artgalry cil +# application/vnd.ms-asf +application/vnd.ms-cab-compressed cab +# application/vnd.ms-color.iccprofile +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-excel.addin.macroenabled.12 xlam +application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb +application/vnd.ms-excel.sheet.macroenabled.12 xlsm +application/vnd.ms-excel.template.macroenabled.12 xltm +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +# application/vnd.ms-office.activex+xml +application/vnd.ms-officetheme thmx +# application/vnd.ms-opentype +# application/vnd.ms-package.obfuscated-opentype +application/vnd.ms-pki.seccat cat +application/vnd.ms-pki.stl stl +# application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps pot +application/vnd.ms-powerpoint.addin.macroenabled.12 ppam +application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm +application/vnd.ms-powerpoint.slide.macroenabled.12 sldm +application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm +application/vnd.ms-powerpoint.template.macroenabled.12 potm +# application/vnd.ms-printdevicecapabilities+xml +# application/vnd.ms-printing.printticket+xml +# application/vnd.ms-printschematicket+xml +application/vnd.ms-project mpp mpt +# application/vnd.ms-tnef +# application/vnd.ms-windows.devicepairing +# application/vnd.ms-windows.nwprinting.oob +# application/vnd.ms-windows.printerpairing +# application/vnd.ms-windows.wsd.oob +# application/vnd.ms-wmdrm.lic-chlg-req +# application/vnd.ms-wmdrm.lic-resp +# application/vnd.ms-wmdrm.meter-chlg-req +# application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-word.document.macroenabled.12 docm +application/vnd.ms-word.template.macroenabled.12 dotm +application/vnd.ms-works wps wks wcm wdb +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +# application/vnd.msa-disk-image +application/vnd.mseq mseq +# application/vnd.msign +# application/vnd.multiad.creator +# application/vnd.multiad.creator.cif +# application/vnd.music-niff +application/vnd.musician mus +application/vnd.muvee.style msty +application/vnd.mynfc taglet +# application/vnd.ncd.control +# application/vnd.ncd.reference +# application/vnd.nervana +# application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +# application/vnd.nintendo.nitro.rom +# application/vnd.nintendo.snes.rom +application/vnd.nitf ntf nitf +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +# application/vnd.nokia.catalogs +# application/vnd.nokia.conml+wbxml +# application/vnd.nokia.conml+xml +# application/vnd.nokia.iptv.config+xml +# application/vnd.nokia.isds-radio-presets +# application/vnd.nokia.landmark+wbxml +# application/vnd.nokia.landmark+xml +# application/vnd.nokia.landmarkcollection+xml +# application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.n-gage.symbian.install n-gage +# application/vnd.nokia.ncd +# application/vnd.nokia.pcd+wbxml +# application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.edm edm +application/vnd.novadigm.edx edx +application/vnd.novadigm.ext ext +# application/vnd.ntt-local.content-share +# application/vnd.ntt-local.file-transfer +# application/vnd.ntt-local.ogw_remote-access +# application/vnd.ntt-local.sip-ta_remote +# application/vnd.ntt-local.sip-ta_tcp_stream +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template odft +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +# application/vnd.obn +# application/vnd.oftn.l10n+json +# application/vnd.oipf.contentaccessdownload+xml +# application/vnd.oipf.contentaccessstreaming+xml +# application/vnd.oipf.cspg-hexbinary +# application/vnd.oipf.dae.svg+xml +# application/vnd.oipf.dae.xhtml+xml +# application/vnd.oipf.mippvcontrolmessage+xml +# application/vnd.oipf.pae.gem +# application/vnd.oipf.spdiscovery+xml +# application/vnd.oipf.spdlist+xml +# application/vnd.oipf.ueprofile+xml +# application/vnd.oipf.userprofile+xml +application/vnd.olpc-sugar xo +# application/vnd.oma-scws-config +# application/vnd.oma-scws-http-request +# application/vnd.oma-scws-http-response +# application/vnd.oma.bcast.associated-procedure-parameter+xml +# application/vnd.oma.bcast.drm-trigger+xml +# application/vnd.oma.bcast.imd+xml +# application/vnd.oma.bcast.ltkm +# application/vnd.oma.bcast.notification+xml +# application/vnd.oma.bcast.provisioningtrigger +# application/vnd.oma.bcast.sgboot +# application/vnd.oma.bcast.sgdd+xml +# application/vnd.oma.bcast.sgdu +# application/vnd.oma.bcast.simple-symbol-container +# application/vnd.oma.bcast.smartcard-trigger+xml +# application/vnd.oma.bcast.sprov+xml +# application/vnd.oma.bcast.stkm +# application/vnd.oma.cab-address-book+xml +# application/vnd.oma.cab-feature-handler+xml +# application/vnd.oma.cab-pcc+xml +# application/vnd.oma.cab-subs-invite+xml +# application/vnd.oma.cab-user-prefs+xml +# application/vnd.oma.dcd +# application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +# application/vnd.oma.drm.risd+xml +# application/vnd.oma.group-usage-list+xml +# application/vnd.oma.lwm2m+json +# application/vnd.oma.lwm2m+tlv +# application/vnd.oma.pal+xml +# application/vnd.oma.poc.detailed-progress-report+xml +# application/vnd.oma.poc.final-report+xml +# application/vnd.oma.poc.groups+xml +# application/vnd.oma.poc.invocation-descriptor+xml +# application/vnd.oma.poc.optimized-progress-report+xml +# application/vnd.oma.push +# application/vnd.oma.scidm.messages+xml +# application/vnd.oma.xcap-directory+xml +# application/vnd.omads-email+xml +# application/vnd.omads-file+xml +# application/vnd.omads-folder+xml +# application/vnd.omaloc-supl-init +# application/vnd.onepager +# application/vnd.openblox.game+xml +# application/vnd.openblox.game-binary +# application/vnd.openeye.oeb +application/vnd.openofficeorg.extension oxt +# application/vnd.openxmlformats-officedocument.custom-properties+xml +# application/vnd.openxmlformats-officedocument.customxmlproperties+xml +# application/vnd.openxmlformats-officedocument.drawing+xml +# application/vnd.openxmlformats-officedocument.drawingml.chart+xml +# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml +# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml +# application/vnd.openxmlformats-officedocument.extended-properties+xml +# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml +# application/vnd.openxmlformats-officedocument.presentationml.comments+xml +# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml +# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml +# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml +application/vnd.openxmlformats-officedocument.presentationml.slide sldx +# application/vnd.openxmlformats-officedocument.presentationml.slide+xml +# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml +# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml +# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml +# application/vnd.openxmlformats-officedocument.presentationml.tags+xml +application/vnd.openxmlformats-officedocument.presentationml.template potx +# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml +# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml +# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml +# application/vnd.openxmlformats-officedocument.theme+xml +# application/vnd.openxmlformats-officedocument.themeoverride+xml +# application/vnd.openxmlformats-officedocument.vmldrawing +# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml +# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml +# application/vnd.openxmlformats-package.core-properties+xml +# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml +# application/vnd.openxmlformats-package.relationships+xml +# application/vnd.oracle.resource+json +# application/vnd.orange.indata +# application/vnd.osa.netdeploy +application/vnd.osgeo.mapguide.package mgp +# application/vnd.osgi.bundle +application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa +# application/vnd.otps.ct-kip+xml +# application/vnd.oxli.countgraph +# application/vnd.pagerduty+json +application/vnd.palm pdb pqa oprc +# application/vnd.panoply +# application/vnd.paos.xml +application/vnd.pawaafile paw +# application/vnd.pcos +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +# application/vnd.piaccess.application-licence +application/vnd.picsel efif +application/vnd.pmi.widget wg +# application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +# application/vnd.powerbuilder6-s +# application/vnd.powerbuilder7 +# application/vnd.powerbuilder7-s +# application/vnd.powerbuilder75 +# application/vnd.powerbuilder75-s +# application/vnd.preminet +application/vnd.previewsystems.box box +application/vnd.proteus.magazine mgz +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +# application/vnd.pwg-multiplexed +# application/vnd.pwg-xhtml-print+xml +# application/vnd.qualcomm.brew-app-res +# application/vnd.quarantainenet +application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb +# application/vnd.quobject-quoxdocument +# application/vnd.radisys.moml+xml +# application/vnd.radisys.msml+xml +# application/vnd.radisys.msml-audit+xml +# application/vnd.radisys.msml-audit-conf+xml +# application/vnd.radisys.msml-audit-conn+xml +# application/vnd.radisys.msml-audit-dialog+xml +# application/vnd.radisys.msml-audit-stream+xml +# application/vnd.radisys.msml-conf+xml +# application/vnd.radisys.msml-dialog+xml +# application/vnd.radisys.msml-dialog-base+xml +# application/vnd.radisys.msml-dialog-fax-detect+xml +# application/vnd.radisys.msml-dialog-fax-sendrecv+xml +# application/vnd.radisys.msml-dialog-group+xml +# application/vnd.radisys.msml-dialog-speech+xml +# application/vnd.radisys.msml-dialog-transform+xml +# application/vnd.rainstor.data +# application/vnd.rapid +# application/vnd.rar +application/vnd.realvnc.bed bed +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml musicxml +# application/vnd.renlearn.rlprint +application/vnd.rig.cryptonote cryptonote +application/vnd.rim.cod cod +application/vnd.rn-realmedia rm +application/vnd.rn-realmedia-vbr rmvb +application/vnd.route66.link66+xml link66 +# application/vnd.rs-274x +# application/vnd.ruckus.download +# application/vnd.s3sms +application/vnd.sailingtracker.track st +# application/vnd.sbm.cid +# application/vnd.sbm.mid2 +# application/vnd.scribus +# application/vnd.sealed.3df +# application/vnd.sealed.csf +# application/vnd.sealed.doc +# application/vnd.sealed.eml +# application/vnd.sealed.mht +# application/vnd.sealed.net +# application/vnd.sealed.ppt +# application/vnd.sealed.tiff +# application/vnd.sealed.xls +# application/vnd.sealedmedia.softseal.html +# application/vnd.sealedmedia.softseal.pdf +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.simtech-mindmapper twd twds +# application/vnd.siren+json +application/vnd.smaf mmf +# application/vnd.smart.notebook +application/vnd.smart.teacher teacher +# application/vnd.software602.filler.form+xml +# application/vnd.software602.filler.form-xml-zip +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +# application/vnd.sss-cod +# application/vnd.sss-dtf +# application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math smf +application/vnd.stardivision.writer sdw vor +application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip +application/vnd.stepmania.stepchart sm +# application/vnd.street-stream +# application/vnd.sun.wadl+xml +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.sus-calendar sus susp +application/vnd.svd svd +# application/vnd.swiftview-ics +application/vnd.symbian.install sis sisx +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +# application/vnd.syncml.dm.notification +# application/vnd.syncml.dmddf+wbxml +# application/vnd.syncml.dmddf+xml +# application/vnd.syncml.dmtnds+wbxml +# application/vnd.syncml.dmtnds+xml +# application/vnd.syncml.ds.notification +application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap pcap cap dmp +# application/vnd.tmd.mediaflex.api+xml +# application/vnd.tml +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +# application/vnd.truedoc +# application/vnd.ubisoft.webplayer +application/vnd.ufdl ufd ufdl +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml +# application/vnd.uplanet.alert +# application/vnd.uplanet.alert-wbxml +# application/vnd.uplanet.bearer-choice +# application/vnd.uplanet.bearer-choice-wbxml +# application/vnd.uplanet.cacheop +# application/vnd.uplanet.cacheop-wbxml +# application/vnd.uplanet.channel +# application/vnd.uplanet.channel-wbxml +# application/vnd.uplanet.list +# application/vnd.uplanet.list-wbxml +# application/vnd.uplanet.listcmd +# application/vnd.uplanet.listcmd-wbxml +# application/vnd.uplanet.signal +# application/vnd.uri-map +# application/vnd.valve.source.material +application/vnd.vcx vcx +# application/vnd.vd-study +# application/vnd.vectorworks +# application/vnd.vel+json +# application/vnd.verimatrix.vcas +# application/vnd.vidsoft.vidconference +application/vnd.visio vsd vst vss vsw +application/vnd.visionary vis +# application/vnd.vividence.scriptfile +application/vnd.vsf vsf +# application/vnd.wap.sic +# application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +# application/vnd.wfa.p2p +# application/vnd.wfa.wsc +# application/vnd.windows.devicepairing +# application/vnd.wmc +# application/vnd.wmf.bootstrap +# application/vnd.wolfram.mathematica +# application/vnd.wolfram.mathematica.package +application/vnd.wolfram.player nbp +application/vnd.wordperfect wpd +application/vnd.wqd wqd +# application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +# application/vnd.wv.csp+wbxml +# application/vnd.wv.csp+xml +# application/vnd.wv.ssp+xml +# application/vnd.xacml+json +application/vnd.xara xar +application/vnd.xfdl xfdl +# application/vnd.xfdl.webform +# application/vnd.xmi+xml +# application/vnd.xmpie.cpkg +# application/vnd.xmpie.dpkg +# application/vnd.xmpie.plan +# application/vnd.xmpie.ppkg +# application/vnd.xmpie.xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.openscoreformat osf +application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg +# application/vnd.yamaha.remote-setup +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +# application/vnd.yamaha.through-ngn +# application/vnd.yamaha.tunnel-udpencap +# application/vnd.yaoweme +application/vnd.yellowriver-custom-menu cmp +application/vnd.zul zir zirz +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +# application/vq-rtcpxr +application/wasm wasm +# application/watcherinfo+xml +# application/whoispp-query +# application/whoispp-response +application/widget wgt +application/winhlp hlp +# application/wita +# application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-7z-compressed 7z +application/x-abiword abw +application/x-ace-compressed ace +# application/x-amf +application/x-apple-diskimage dmg +application/x-authorware-bin aab x32 u32 vox +application/x-authorware-map aam +application/x-authorware-seg aas +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-blorb blb blorb +application/x-bzip bz +application/x-bzip2 bz2 boz +application/x-cbr cbr cba cbt cbz cb7 +application/x-cdlink vcd +application/x-cfs-compressed cfs +application/x-chat chat +application/x-chess-pgn pgn +# application/x-compress +application/x-conference nsc +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb udeb +application/x-dgc-compressed dgc +application/x-director dir dcr dxr cst cct cxt w3d fgd swa +application/x-doom wad +application/x-dtbncx+xml ncx +application/x-dtbook+xml dtb +application/x-dtbresource+xml res +application/x-dvi dvi +application/x-envoy evy +application/x-eva eva +application/x-font-bdf bdf +# application/x-font-dos +# application/x-font-framemaker +application/x-font-ghostscript gsf +# application/x-font-libgrx +application/x-font-linux-psf psf +application/x-font-pcf pcf +application/x-font-snf snf +# application/x-font-speedo +# application/x-font-sunos-news +application/x-font-type1 pfa pfb pfm afm +# application/x-font-vfont +application/x-freearc arc +application/x-futuresplash spl +application/x-gca-compressed gca +application/x-glulx ulx +application/x-gnumeric gnumeric +application/x-gramps-xml gramps +application/x-gtar gtar +# application/x-gzip +application/x-hdf hdf +application/x-install-instructions install +application/x-iso9660-image iso +application/x-java-jnlp-file jnlp +application/x-latex latex +application/x-lzh-compressed lzh lha +application/x-mie mie +application/x-mobipocket-ebook prc mobi +application/x-ms-application application +application/x-ms-shortcut lnk +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-ms-xbap xbap +application/x-msaccess mdb +application/x-msbinder obd +application/x-mscardfile crd +application/x-msclip clp +application/x-msdownload exe dll com bat msi +application/x-msmediaview mvb m13 m14 +application/x-msmetafile wmf wmz emf emz +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswrite wri +application/x-netcdf nc cdf +application/x-nzb nzb +application/x-pkcs12 p12 pfx +application/x-pkcs7-certificates p7b spc +application/x-pkcs7-certreqresp p7r +application/x-rar-compressed rar +application/x-research-info-systems ris +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-silverlight-app xap +application/x-sql sql +application/x-stuffit sit +application/x-stuffitx sitx +application/x-subrip srt +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-t3vm-image t3 +application/x-tads gam +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-tex-tfm tfm +application/x-texinfo texinfo texi +application/x-tgif obj +application/x-ustar ustar +application/x-wais-source src +# application/x-www-form-urlencoded +application/x-x509-ca-cert der crt +application/x-xfig fig +application/x-xliff+xml xlf +application/x-xpinstall xpi +application/x-xz xz +application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 +# application/x400-bp +# application/xacml+xml +application/xaml+xml xaml +# application/xcap-att+xml +# application/xcap-caps+xml +application/xcap-diff+xml xdf +# application/xcap-el+xml +# application/xcap-error+xml +# application/xcap-ns+xml +# application/xcon-conference-info+xml +# application/xcon-conference-info-diff+xml +application/xenc+xml xenc +application/xhtml+xml xhtml xht +# application/xhtml-voice+xml +application/xml xml xsl +application/xml-dtd dtd +# application/xml-external-parsed-entity +# application/xml-patch+xml +# application/xmpp+xml +application/xop+xml xop +application/xproc+xml xpl +application/xslt+xml xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvml xvm +application/yang yang +application/yin+xml yin +application/zip zip +# application/zlib +# audio/1d-interleaved-parityfec +# audio/32kadpcm +# audio/3gpp +# audio/3gpp2 +# audio/ac3 +audio/adpcm adp +# audio/amr +# audio/amr-wb +# audio/amr-wb+ +# audio/aptx +# audio/asc +# audio/atrac-advanced-lossless +# audio/atrac-x +# audio/atrac3 +audio/basic au snd +# audio/bv16 +# audio/bv32 +# audio/clearmode +# audio/cn +# audio/dat12 +# audio/dls +# audio/dsr-es201108 +# audio/dsr-es202050 +# audio/dsr-es202211 +# audio/dsr-es202212 +# audio/dv +# audio/dvi4 +# audio/eac3 +# audio/encaprtp +# audio/evrc +# audio/evrc-qcp +# audio/evrc0 +# audio/evrc1 +# audio/evrcb +# audio/evrcb0 +# audio/evrcb1 +# audio/evrcnw +# audio/evrcnw0 +# audio/evrcnw1 +# audio/evrcwb +# audio/evrcwb0 +# audio/evrcwb1 +# audio/evs +# audio/example +# audio/fwdred +# audio/g711-0 +# audio/g719 +# audio/g722 +# audio/g7221 +# audio/g723 +# audio/g726-16 +# audio/g726-24 +# audio/g726-32 +# audio/g726-40 +# audio/g728 +# audio/g729 +# audio/g7291 +# audio/g729d +# audio/g729e +# audio/gsm +# audio/gsm-efr +# audio/gsm-hr-08 +# audio/ilbc +# audio/ip-mr_v2.5 +# audio/isac +# audio/l16 +# audio/l20 +# audio/l24 +# audio/l8 +# audio/lpc +audio/midi mid midi kar rmi +# audio/mobile-xmf +audio/mp4 m4a mp4a +# audio/mp4a-latm +# audio/mpa +# audio/mpa-robust +audio/mpeg mpga mp2 mp2a mp3 m2a m3a +# audio/mpeg4-generic +# audio/musepack +audio/ogg oga ogg spx opus +# audio/opus +# audio/parityfec +# audio/pcma +# audio/pcma-wb +# audio/pcmu +# audio/pcmu-wb +# audio/prs.sid +# audio/qcelp +# audio/raptorfec +# audio/red +# audio/rtp-enc-aescm128 +# audio/rtp-midi +# audio/rtploopback +# audio/rtx +audio/s3m s3m +audio/silk sil +# audio/smv +# audio/smv-qcp +# audio/smv0 +# audio/sp-midi +# audio/speex +# audio/t140c +# audio/t38 +# audio/telephone-event +# audio/tone +# audio/uemclip +# audio/ulpfec +# audio/vdvi +# audio/vmr-wb +# audio/vnd.3gpp.iufp +# audio/vnd.4sb +# audio/vnd.audiokoz +# audio/vnd.celp +# audio/vnd.cisco.nse +# audio/vnd.cmles.radio-events +# audio/vnd.cns.anp1 +# audio/vnd.cns.inf1 +audio/vnd.dece.audio uva uvva +audio/vnd.digital-winds eol +# audio/vnd.dlna.adts +# audio/vnd.dolby.heaac.1 +# audio/vnd.dolby.heaac.2 +# audio/vnd.dolby.mlp +# audio/vnd.dolby.mps +# audio/vnd.dolby.pl2 +# audio/vnd.dolby.pl2x +# audio/vnd.dolby.pl2z +# audio/vnd.dolby.pulse.1 +audio/vnd.dra dra +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +# audio/vnd.dvb.file +# audio/vnd.everad.plj +# audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +# audio/vnd.nokia.mobile-xmf +# audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +# audio/vnd.octel.sbc +# audio/vnd.qcelp +# audio/vnd.rhetorex.32kadpcm +audio/vnd.rip rip +# audio/vnd.sealedmedia.softseal.mpeg +# audio/vnd.vmx.cvsd +# audio/vorbis +# audio/vorbis-config +audio/webm weba +audio/x-aac aac +audio/x-aiff aif aiff aifc +audio/x-caf caf +audio/x-flac flac +audio/x-matroska mka +audio/x-mpegurl m3u +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ram ra +audio/x-pn-realaudio-plugin rmp +# audio/x-tta +audio/x-wav wav +audio/xm xm +chemical/x-cdx cdx +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-csml csml +# chemical/x-pdb +chemical/x-xyz xyz +font/collection ttc +font/otf otf +# font/sfnt +font/ttf ttf +font/woff woff +font/woff2 woff2 +image/avif avif +image/bmp bmp +image/cgm cgm +# image/dicom-rle +# image/emf +# image/example +# image/fits +image/g3fax g3 +image/gif gif +image/ief ief +# image/jls +# image/jp2 +image/jpeg jpeg jpg jpe +# image/jpm +# image/jpx +image/jxl jxl +image/ktx ktx +# image/naplps +image/png png +image/prs.btif btif +# image/prs.pti +# image/pwg-raster +image/sgi sgi +image/svg+xml svg svgz +# image/t38 +image/tiff tiff tif +# image/tiff-fx +image/vnd.adobe.photoshop psd +# image/vnd.airzip.accelerator.azv +# image/vnd.cns.inf2 +image/vnd.dece.graphic uvi uvvi uvg uvvg +image/vnd.djvu djvu djv +image/vnd.dvb.subtitle sub +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +# image/vnd.globalgraphics.pgb +# image/vnd.microsoft.icon +# image/vnd.mix +# image/vnd.mozilla.apng +image/vnd.ms-modi mdi +image/vnd.ms-photo wdp +image/vnd.net-fpx npx +# image/vnd.radiance +# image/vnd.sealed.png +# image/vnd.sealedmedia.softseal.gif +# image/vnd.sealedmedia.softseal.jpg +# image/vnd.svf +# image/vnd.tencent.tap +# image/vnd.valve.source.texture +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +# image/vnd.zbrush.pcx +image/webp webp +# image/wmf +image/x-3ds 3ds +image/x-cmu-raster ras +image/x-cmx cmx +image/x-freehand fh fhc fh4 fh5 fh7 +image/x-icon ico +image/x-mrsid-image sid +image/x-pcx pcx +image/x-pict pic pct +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-tga tga +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +# message/cpim +# message/delivery-status +# message/disposition-notification +# message/example +# message/external-body +# message/feedback-report +# message/global +# message/global-delivery-status +# message/global-disposition-notification +# message/global-headers +# message/http +# message/imdn+xml +# message/news +# message/partial +message/rfc822 eml mime +# message/s-http +# message/sip +# message/sipfrag +# message/tracking-status +# message/vnd.si.simp +# message/vnd.wfa.wsc +# model/example +# model/gltf+json +model/iges igs iges +model/mesh msh mesh silo +model/vnd.collada+xml dae +model/vnd.dwf dwf +# model/vnd.flatland.3dml +model/vnd.gdl gdl +# model/vnd.gs-gdl +# model/vnd.gs.gdl +model/vnd.gtw gtw +# model/vnd.moml+xml +# model/vnd.mts +# model/vnd.opengex +# model/vnd.parasolid.transmit.binary +# model/vnd.parasolid.transmit.text +# model/vnd.rosette.annotated-data-model +# model/vnd.valve.source.compiled-map +model/vnd.vtu vtu +model/vrml wrl vrml +model/x3d+binary x3db x3dbz +# model/x3d+fastinfoset +model/x3d+vrml x3dv x3dvz +model/x3d+xml x3d x3dz +# model/x3d-vrml +# multipart/alternative +# multipart/appledouble +# multipart/byteranges +# multipart/digest +# multipart/encrypted +# multipart/example +# multipart/form-data +# multipart/header-set +# multipart/mixed +# multipart/parallel +# multipart/related +# multipart/report +# multipart/signed +# multipart/voice-message +# multipart/x-mixed-replace +# text/1d-interleaved-parityfec +text/cache-manifest appcache +text/calendar ics ifb +text/css css +text/csv csv +# text/csv-schema +# text/directory +# text/dns +# text/ecmascript +# text/encaprtp +# text/enriched +# text/example +# text/fwdred +# text/grammar-ref-list +text/html html htm +text/javascript js mjs +# text/jcr-cnd +# text/markdown +# text/mizar +text/n3 n3 +# text/parameters +# text/parityfec +text/plain txt text conf def list log in +# text/provenance-notation +# text/prs.fallenstein.rst +text/prs.lines.tag dsc +# text/prs.prop.logic +# text/raptorfec +# text/red +# text/rfc822-headers +text/richtext rtx +# text/rtf +# text/rtp-enc-aescm128 +# text/rtploopback +# text/rtx +text/sgml sgml sgm +# text/t140 +text/tab-separated-values tsv +text/troff t tr roff man me ms +text/turtle ttl +# text/ulpfec +text/uri-list uri uris urls +text/vcard vcard +# text/vnd.a +# text/vnd.abc +text/vnd.curl curl +text/vnd.curl.dcurl dcurl +text/vnd.curl.mcurl mcurl +text/vnd.curl.scurl scurl +# text/vnd.debian.copyright +# text/vnd.dmclientscript +text/vnd.dvb.subtitle sub +# text/vnd.esmertec.theme-descriptor +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.graphviz gv +text/vnd.in3d.3dml 3dml +text/vnd.in3d.spot spot +# text/vnd.iptc.newsml +# text/vnd.iptc.nitf +# text/vnd.latex-z +# text/vnd.motorola.reflex +# text/vnd.ms-mediapackage +# text/vnd.net2phone.commcenter.command +# text/vnd.radisys.msml-basic-layout +# text/vnd.si.uricatalogue +text/vnd.sun.j2me.app-descriptor jad +# text/vnd.trolltech.linguist +# text/vnd.wap.si +# text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-asm s asm +text/x-c c cc cxx cpp h hh dic +text/x-fortran f for f77 f90 +text/x-java-source java +text/x-nfo nfo +text/x-opml opml +text/x-pascal p pas +text/x-setext etx +text/x-sfv sfv +text/x-uuencode uu +text/x-vcalendar vcs +text/x-vcard vcf +# text/xml +# text/xml-external-parsed-entity +# video/1d-interleaved-parityfec +video/3gpp 3gp +# video/3gpp-tt +video/3gpp2 3g2 +# video/bmpeg +# video/bt656 +# video/celb +# video/dv +# video/encaprtp +# video/example +video/h261 h261 +video/h263 h263 +# video/h263-1998 +# video/h263-2000 +video/h264 h264 +# video/h264-rcdo +# video/h264-svc +# video/h265 +# video/iso.segment +video/jpeg jpgv +# video/jpeg2000 +video/jpm jpm jpgm +video/mj2 mj2 mjp2 +# video/mp1s +# video/mp2p +video/mp2t ts m2t m2ts mts +video/mp4 mp4 mp4v mpg4 +# video/mp4v-es +video/mpeg mpeg mpg mpe m1v m2v +# video/mpeg4-generic +# video/mpv +# video/nv +video/ogg ogv +# video/parityfec +# video/pointer +video/quicktime qt mov +# video/raptorfec +# video/raw +# video/rtp-enc-aescm128 +# video/rtploopback +# video/rtx +# video/smpte292m +# video/ulpfec +# video/vc1 +# video/vnd.cctv +video/vnd.dece.hd uvh uvvh +video/vnd.dece.mobile uvm uvvm +# video/vnd.dece.mp4 +video/vnd.dece.pd uvp uvvp +video/vnd.dece.sd uvs uvvs +video/vnd.dece.video uvv uvvv +# video/vnd.directv.mpeg +# video/vnd.directv.mpeg-tts +# video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb +video/vnd.fvt fvt +# video/vnd.hns.video +# video/vnd.iptvforum.1dparityfec-1010 +# video/vnd.iptvforum.1dparityfec-2005 +# video/vnd.iptvforum.2dparityfec-1010 +# video/vnd.iptvforum.2dparityfec-2005 +# video/vnd.iptvforum.ttsavc +# video/vnd.iptvforum.ttsmpeg2 +# video/vnd.motorola.video +# video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.ms-playready.media.pyv pyv +# video/vnd.nokia.interleaved-multimedia +# video/vnd.nokia.videovoip +# video/vnd.objectvideo +# video/vnd.radgamettools.bink +# video/vnd.radgamettools.smacker +# video/vnd.sealed.mpeg1 +# video/vnd.sealed.mpeg4 +# video/vnd.sealed.swf +# video/vnd.sealedmedia.softseal.mov +video/vnd.uvvu.mp4 uvu uvvu +video/vnd.vivo viv +# video/vp8 +video/webm webm +video/x-f4v f4v +video/x-fli fli +video/x-flv flv +video/x-m4v m4v +video/x-matroska mkv mk3d mks +video/x-mng mng +video/x-ms-asf asf asx +video/x-ms-vob vob +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +video/x-smv smv +x-conference/x-cooltalk ice diff --git a/pkgs/mime/tool/README.md b/pkgs/mime/tool/README.md new file mode 100644 index 0000000000..6b25a9dcd0 --- /dev/null +++ b/pkgs/mime/tool/README.md @@ -0,0 +1,12 @@ + +## download_mime_info.dart + +Run `dart tool/download_mime_info.dart` to download the latest mime information +to `third_party/httpd/mime.types`. + +## regenerate_tables.dart + +Run `dart tool/regenerate_tables.dart` to rebuild the +`lib/src/media_types.g.dart` tables with the latest information from +the `mime.types` table and the additional customizations in +`regenerate_tables.dart`. diff --git a/pkgs/mime/tool/download_mime_info.dart b/pkgs/mime/tool/download_mime_info.dart new file mode 100644 index 0000000000..f4847acdc1 --- /dev/null +++ b/pkgs/mime/tool/download_mime_info.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +import 'package:http/http.dart' as http; +import 'package:path/path.dart' as path; + +void main(List args) async { + // https://github.com/apache/httpd/blob/trunk/docs/conf/mime.types + const mimeTypesUrl = 'https://raw.githubusercontent.com/' + 'apache/httpd/refs/heads/trunk/docs/conf/mime.types'; + + print('Reading from $mimeTypesUrl ...'); + final response = await http.get(Uri.parse(mimeTypesUrl)); + + final outFile = File(path.join('third_party', 'httpd', 'mime.types')); + outFile.writeAsStringSync(response.body); + print('Wrote ${outFile.path}.'); +} diff --git a/pkgs/mime/tool/media_types.dart b/pkgs/mime/tool/media_types.dart deleted file mode 100644 index 2c5734ef4d..0000000000 --- a/pkgs/mime/tool/media_types.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// Script to update the `../doc/media_types.md` file from -/// [defaultExtensionMap]. -library; - -import 'dart:io'; - -import 'package:mime/mime.dart'; -import 'package:mime/src/default_extension_map.dart' show defaultExtensionMap; - -void main() { - // Find all the mime types and extensions. - final mimeToExts = >{}; - - for (final entry in defaultExtensionMap.entries) { - final ext = entry.key; - final mime = entry.value; - - (mimeToExts[mime] ??= []).add(ext); - } - - final mimeTypes = [...mimeToExts.keys]..sort(); - - // Emit the table. - const startMarker = '\n'; - const endMarker = '\n'; - - final file = File.fromUri(Platform.script.resolve('../doc/media_types.md')); - final contents = file.readAsStringSync(); - final prefix = - contents.substring(0, contents.indexOf(startMarker) + startMarker.length); - final suffix = contents.substring(contents.lastIndexOf(endMarker)); - - final buf = StringBuffer(prefix); - buf.writeln(); - buf.write(''' -| MIME type | Default | Additional | -| ---------------------------------------- | ----------- | ------------------- | -'''); - - for (final mime in mimeTypes) { - final defaultExt = extensionFromMime(mime)!; - final exts = mimeToExts[mime]!.toList(); - - exts.remove(defaultExt); - exts.sort(); - - final additional = exts.join(', '); - - buf.writeln('| ${markdownEscape(mime).padRight(40)} | ' - '${markdownEscape(defaultExt).padRight(11)} | ' - '${markdownEscape(additional).padRight(19)} |'); - } - - buf.writeln(); - buf.write(suffix); - - file.writeAsStringSync('${buf.toString().trim()}\n'); -} - -String markdownEscape(String markdown) { - // See https://www.markdownguide.org/basic-syntax/#escaping-characters. - - // Escape the escape character. - markdown = markdown.replaceAll(r'\', r'\\'); - - // Escape other special characters. - markdown = markdown.replaceAll('_', r'\_'); - - return markdown; -} diff --git a/pkgs/mime/tool/regenerate_tables.dart b/pkgs/mime/tool/regenerate_tables.dart new file mode 100644 index 0000000000..3c1ccc84b7 --- /dev/null +++ b/pkgs/mime/tool/regenerate_tables.dart @@ -0,0 +1,224 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +import 'package:path/path.dart' as path; + +/// Define additions to the base apache/httpd mime set. +const Map> mimeAdditions = { + 'application/dicom': ['dcm'], + 'application/manifest+json': ['webmanifest'], + 'application/toml': ['toml'], + 'image/heic': ['heic'], + 'image/heif': ['heif'], + 'model/gltf-binary': ['glb'], + 'model/gltf+json': ['gltf'], + 'text/markdown': ['md', 'markdown'], + 'text/x-dart': ['dart'], +}; + +/// Define preferred extensions for mime types. +const Map preferredExtensions = { + // For continuity with package:mime 2.0.0. + 'application/mathematica': 'nb', + 'application/mp21': 'mp21', + + // Best practices for preferred file extensions. + 'application/postscript': 'ps', + 'application/smil+xml': 'smil', + 'audio/mpeg': 'mp3', + 'audio/ogg': 'ogg', + 'image/jpeg': 'jpg', + 'model/vrml': 'vrml', + 'text/x-asm': 'asm', + 'text/x-pascal': 'pas', + 'video/mpeg': 'mpg', + 'video/quicktime': 'mov', +}; + +/// Define mime type renames. +/// +/// Generally these are places where the mime.types table differs from +/// https://www.iana.org/assignments/media-types/media-types.xhtml. +const Map mimeConversions = { + 'audio/x-aac': 'audio/aac', +}; + +void main(List args) { + final mimeTypes = readMimeTypes(); + + // Make any necessary mime name conversions. + for (final oldMime in mimeConversions.keys) { + final newMime = mimeConversions[oldMime]!; + mimeTypes[newMime] = mimeTypes.remove(oldMime)!; + } + + // Make sure we don't have conflicts with our preferred extension mappings. + final customExtensions = preferredExtensions.values.toSet(); + for (final exts in mimeAdditions.values) { + customExtensions.addAll(exts); + } + for (final entry in mimeTypes.entries.toList()) { + final exts = entry.value; + exts.removeWhere(customExtensions.contains); + if (exts.isEmpty) { + mimeTypes.remove(entry.key); + } + } + + // Add additonal mime types. + for (final entry in mimeAdditions.entries) { + final mime = entry.key; + final exts = entry.value; + + mimeTypes.putIfAbsent(mime, () => []).addAll(exts); + } + + // Use our preferred extensions for specific types. + for (final entry in preferredExtensions.entries) { + final mime = entry.key; + final preferredExtension = entry.value; + + final exts = mimeTypes[mime]!; + exts.remove(preferredExtension); + exts.insert(0, preferredExtension); + } + + // Sort to normalize the table, but preserve the position of the first file + // extension. + final sortedMimeTypes = >{}; + for (final mime in mimeTypes.keys.toList()..sort()) { + final exts = mimeTypes[mime]!; + final defaultExt = exts.first; + final other = exts.sublist(1)..sort(); + sortedMimeTypes[mime] = [defaultExt, ...other]; + } + + var file = writeMediaTypesFile(sortedMimeTypes); + print('Wrote ${path.relative(file.path)}.'); + + file = updateMediaTypesMarkdown(sortedMimeTypes); + print('Updated ${path.relative(file.path)}.'); +} + +Map> readMimeTypes() { + final dataFile = File(path.join('third_party', 'httpd', 'mime.types')); + + print('Reading ${path.relative(dataFile.path)}...'); + + final mimeToExtensions = >{}; + final wsRegex = RegExp(' +'); + + for (var line in dataFile + .readAsLinesSync() + .where((line) => !line.startsWith('#') && line.isNotEmpty)) { + line = line.replaceAll('\t', ' ').replaceAll(wsRegex, ' '); + final segments = line.split(' '); + final mime = segments[0]; + final extensions = segments.sublist(1); + + mimeToExtensions[mime] = extensions; + } + + return mimeToExtensions; +} + +File writeMediaTypesFile(Map> mimeToExtensions) { + final out = StringBuffer(); + + // Write the media to file extensions mapping table. + out.writeln(''' +/// A map of mime types to file extensions for that type. +/// +/// If a mime type has multiple file extenions, the first in the list will be +/// returned as the preferred file extension for that type.'''); + out.writeln('const Map> mediaToExtensions = {'); + for (final mime in mimeToExtensions.keys) { + final exts = mimeToExtensions[mime]!; + final describe = exts.map((ext) => "'$ext'").join(', '); + out.writeln(" '$mime': [$describe],"); + } + out.writeln('};'); + + out.writeln(); + + // Write the file extension to media type mapping table. + out.writeln('/// A map of file extensions to their associated mime type.'); + out.writeln('const Map extensionToMedia = {'); + final alreadySeen = {}; + for (final mime in mimeToExtensions.keys) { + final exts = mimeToExtensions[mime]!; + for (final ext in exts) { + if (alreadySeen.containsKey(ext)) { + print( + '- $ext already seen for ${alreadySeen[ext]}, not using for $mime'); + } else { + out.writeln(" '$ext': '$mime',"); + alreadySeen[ext] = mime; + } + } + } + out.writeln('};'); + + final outPath = path.join('lib/src/media_types.g.dart'); + return _writeDartFile(outPath, out.toString()); +} + +File updateMediaTypesMarkdown(Map> mimeToExtensions) { + // Emit the table. + const startMarker = '\n'; + const endMarker = '\n'; + + final file = File.fromUri(Platform.script.resolve('../doc/media_types.md')); + final contents = file.readAsStringSync(); + final prefix = + contents.substring(0, contents.indexOf(startMarker) + startMarker.length); + final suffix = contents.substring(contents.lastIndexOf(endMarker)); + + final buf = StringBuffer(prefix); + buf.writeln(); + buf.write(''' +| MIME type | Default | Additional | +| ---------------------------------------- | ----------- | ------------------- | +'''); + + for (final mime in mimeToExtensions.keys) { + final exts = mimeToExtensions[mime]!.toList(); + + final defaultExt = exts.first; + exts.remove(defaultExt); + + final additional = exts.join(', '); + + buf.writeln('| ${mime.padRight(40)} | ' + '${defaultExt.padRight(11)} | ' + '${additional.padRight(19)} |'); + } + + buf.writeln(); + buf.write(suffix); + + file.writeAsStringSync('${buf.toString().trim()}\n'); + + return file; +} + +File _writeDartFile(String filePath, String content) { + final file = File(filePath); + file.writeAsStringSync(''' +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Generated file - do not edit. + +$content +'''); + + // Format the generated file. + Process.runSync(Platform.resolvedExecutable, ['format', filePath]); + + return file; +}