@wooksjs/http-static 0.4.9 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2,1426 +2,1400 @@ import { useHttpContext, useResponse, useSetHeaders, useHeaders, useRequest, use
2
2
  import { createReadStream, promises } from 'fs';
3
3
  import path from 'path';
4
4
 
5
- /******************************************************************************
6
- Copyright (c) Microsoft Corporation.
7
-
8
- Permission to use, copy, modify, and/or distribute this software for any
9
- purpose with or without fee is hereby granted.
10
-
11
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
- PERFORMANCE OF THIS SOFTWARE.
18
- ***************************************************************************** */
19
-
20
- function __awaiter(thisArg, _arguments, P, generator) {
21
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
- return new (P || (P = Promise))(function (resolve, reject) {
23
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
24
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26
- step((generator = generator.apply(thisArg, _arguments || [])).next());
27
- });
28
- }
29
-
30
- const extensions = {
31
- '123': 'application/vnd.lotus-1-2-3',
32
- ez: 'application/andrew-inset',
33
- aw: 'application/applixware',
34
- atom: 'application/atom+xml',
35
- atomcat: 'application/atomcat+xml',
36
- atomdeleted: 'application/atomdeleted+xml',
37
- atomsvc: 'application/atomsvc+xml',
38
- dwd: 'application/atsc-dwd+xml',
39
- held: 'application/atsc-held+xml',
40
- rsat: 'application/atsc-rsat+xml',
41
- bdoc: 'application/x-bdoc',
42
- xcs: 'application/calendar+xml',
43
- ccxml: 'application/ccxml+xml',
44
- cdfx: 'application/cdfx+xml',
45
- cdmia: 'application/cdmi-capability',
46
- cdmic: 'application/cdmi-container',
47
- cdmid: 'application/cdmi-domain',
48
- cdmio: 'application/cdmi-object',
49
- cdmiq: 'application/cdmi-queue',
50
- cpl: 'application/cpl+xml',
51
- cu: 'application/cu-seeme',
52
- cwl: 'application/cwl',
53
- mpd: 'application/dash+xml',
54
- mpp: 'application/vnd.ms-project',
55
- davmount: 'application/davmount+xml',
56
- dbk: 'application/docbook+xml',
57
- dssc: 'application/dssc+der',
58
- xdssc: 'application/dssc+xml',
59
- ecma: 'application/ecmascript',
60
- emma: 'application/emma+xml',
61
- emotionml: 'application/emotionml+xml',
62
- epub: 'application/epub+zip',
63
- exi: 'application/exi',
64
- exp: 'application/express',
65
- fdf: 'application/vnd.fdf',
66
- fdt: 'application/fdt+xml',
67
- pfr: 'application/font-tdpfr',
68
- geojson: 'application/geo+json',
69
- gml: 'application/gml+xml',
70
- gpx: 'application/gpx+xml',
71
- gxf: 'application/gxf',
72
- gz: 'application/gzip',
73
- hjson: 'application/hjson',
74
- stk: 'application/hyperstudio',
75
- ink: 'application/inkml+xml',
76
- inkml: 'application/inkml+xml',
77
- ipfix: 'application/ipfix',
78
- its: 'application/its+xml',
79
- jar: 'application/java-archive',
80
- war: 'application/java-archive',
81
- ear: 'application/java-archive',
82
- ser: 'application/java-serialized-object',
83
- class: 'application/java-vm',
84
- js: 'application/javascript',
85
- mjs: 'application/javascript',
86
- json: 'application/json',
87
- map: 'application/json',
88
- json5: 'application/json5',
89
- jsonml: 'application/jsonml+json',
90
- jsonld: 'application/ld+json',
91
- lgr: 'application/lgr+xml',
92
- lostxml: 'application/lost+xml',
93
- hqx: 'application/mac-binhex40',
94
- cpt: 'application/mac-compactpro',
95
- mads: 'application/mads+xml',
96
- webmanifest: 'application/manifest+json',
97
- mrc: 'application/marc',
98
- mrcx: 'application/marcxml+xml',
99
- ma: 'application/mathematica',
100
- nb: 'application/mathematica',
101
- mb: 'application/mathematica',
102
- mathml: 'application/mathml+xml',
103
- mbox: 'application/mbox',
104
- mpf: 'application/media-policy-dataset+xml',
105
- mscml: 'application/mediaservercontrol+xml',
106
- metalink: 'application/metalink+xml',
107
- meta4: 'application/metalink4+xml',
108
- mets: 'application/mets+xml',
109
- maei: 'application/mmt-aei+xml',
110
- musd: 'application/mmt-usd+xml',
111
- mods: 'application/mods+xml',
112
- m21: 'application/mp21',
113
- mp21: 'application/mp21',
114
- mp4s: 'application/mp4',
115
- m4p: 'application/mp4',
116
- doc: 'application/msword',
117
- dot: 'application/msword',
118
- mxf: 'application/mxf',
119
- nq: 'application/n-quads',
120
- nt: 'application/n-triples',
121
- cjs: 'application/node',
122
- bin: 'application/octet-stream',
123
- dms: 'application/octet-stream',
124
- lrf: 'application/octet-stream',
125
- mar: 'application/octet-stream',
126
- so: 'application/octet-stream',
127
- dist: 'application/octet-stream',
128
- distz: 'application/octet-stream',
129
- pkg: 'application/octet-stream',
130
- bpk: 'application/octet-stream',
131
- dump: 'application/octet-stream',
132
- elc: 'application/octet-stream',
133
- deploy: 'application/octet-stream',
134
- exe: 'application/x-msdownload',
135
- dll: 'application/x-msdownload',
136
- deb: 'application/x-debian-package',
137
- dmg: 'application/x-apple-diskimage',
138
- iso: 'application/x-iso9660-image',
139
- img: 'application/octet-stream',
140
- msi: 'application/x-msdownload',
141
- msp: 'application/octet-stream',
142
- msm: 'application/octet-stream',
143
- buffer: 'application/octet-stream',
144
- oda: 'application/oda',
145
- opf: 'application/oebps-package+xml',
146
- ogx: 'application/ogg',
147
- omdoc: 'application/omdoc+xml',
148
- onetoc: 'application/onenote',
149
- onetoc2: 'application/onenote',
150
- onetmp: 'application/onenote',
151
- onepkg: 'application/onenote',
152
- oxps: 'application/oxps',
153
- relo: 'application/p2p-overlay+xml',
154
- xer: 'application/patch-ops-error+xml',
155
- pdf: 'application/pdf',
156
- pgp: 'application/pgp-encrypted',
157
- asc: 'application/pgp-signature',
158
- sig: 'application/pgp-signature',
159
- prf: 'application/pics-rules',
160
- p10: 'application/pkcs10',
161
- p7m: 'application/pkcs7-mime',
162
- p7c: 'application/pkcs7-mime',
163
- p7s: 'application/pkcs7-signature',
164
- p8: 'application/pkcs8',
165
- ac: 'application/vnd.nokia.n-gage.ac+xml',
166
- cer: 'application/pkix-cert',
167
- crl: 'application/pkix-crl',
168
- pkipath: 'application/pkix-pkipath',
169
- pki: 'application/pkixcmp',
170
- pls: 'application/pls+xml',
171
- ai: 'application/postscript',
172
- eps: 'application/postscript',
173
- ps: 'application/postscript',
174
- provx: 'application/provenance+xml',
175
- cww: 'application/prs.cww',
176
- pskcxml: 'application/pskc+xml',
177
- raml: 'application/raml+yaml',
178
- rdf: 'application/rdf+xml',
179
- owl: 'application/rdf+xml',
180
- rif: 'application/reginfo+xml',
181
- rnc: 'application/relax-ng-compact-syntax',
182
- rl: 'application/resource-lists+xml',
183
- rld: 'application/resource-lists-diff+xml',
184
- rs: 'application/rls-services+xml',
185
- rapd: 'application/route-apd+xml',
186
- sls: 'application/route-s-tsid+xml',
187
- rusd: 'application/route-usd+xml',
188
- gbr: 'application/rpki-ghostbusters',
189
- mft: 'application/rpki-manifest',
190
- roa: 'application/rpki-roa',
191
- rsd: 'application/rsd+xml',
192
- rss: 'application/rss+xml',
193
- rtf: 'text/rtf',
194
- sbml: 'application/sbml+xml',
195
- scq: 'application/scvp-cv-request',
196
- scs: 'application/scvp-cv-response',
197
- spq: 'application/scvp-vp-request',
198
- spp: 'application/scvp-vp-response',
199
- sdp: 'application/sdp',
200
- senmlx: 'application/senml+xml',
201
- sensmlx: 'application/sensml+xml',
202
- setpay: 'application/set-payment-initiation',
203
- setreg: 'application/set-registration-initiation',
204
- shf: 'application/shf+xml',
205
- siv: 'application/sieve',
206
- sieve: 'application/sieve',
207
- smi: 'application/smil+xml',
208
- smil: 'application/smil+xml',
209
- rq: 'application/sparql-query',
210
- srx: 'application/sparql-results+xml',
211
- gram: 'application/srgs',
212
- grxml: 'application/srgs+xml',
213
- sru: 'application/sru+xml',
214
- ssdl: 'application/ssdl+xml',
215
- ssml: 'application/ssml+xml',
216
- swidtag: 'application/swid+xml',
217
- tei: 'application/tei+xml',
218
- teicorpus: 'application/tei+xml',
219
- tfi: 'application/thraud+xml',
220
- tsd: 'application/timestamped-data',
221
- toml: 'application/toml',
222
- trig: 'application/trig',
223
- ttml: 'application/ttml+xml',
224
- ubj: 'application/ubjson',
225
- rsheet: 'application/urc-ressheet+xml',
226
- td: 'application/urc-targetdesc+xml',
227
- '1km': 'application/vnd.1000minds.decision-model+xml',
228
- plb: 'application/vnd.3gpp.pic-bw-large',
229
- psb: 'application/vnd.3gpp.pic-bw-small',
230
- pvb: 'application/vnd.3gpp.pic-bw-var',
231
- tcap: 'application/vnd.3gpp2.tcap',
232
- pwn: 'application/vnd.3m.post-it-notes',
233
- aso: 'application/vnd.accpac.simply.aso',
234
- imp: 'application/vnd.accpac.simply.imp',
235
- acu: 'application/vnd.acucobol',
236
- atc: 'application/vnd.acucorp',
237
- acutc: 'application/vnd.acucorp',
238
- air: 'application/vnd.adobe.air-application-installer-package+zip',
239
- fcdt: 'application/vnd.adobe.formscentral.fcdt',
240
- fxp: 'application/vnd.adobe.fxp',
241
- fxpl: 'application/vnd.adobe.fxp',
242
- xdp: 'application/vnd.adobe.xdp+xml',
243
- xfdf: 'application/xfdf',
244
- age: 'application/vnd.age',
245
- ahead: 'application/vnd.ahead.space',
246
- azf: 'application/vnd.airzip.filesecure.azf',
247
- azs: 'application/vnd.airzip.filesecure.azs',
248
- azw: 'application/vnd.amazon.ebook',
249
- acc: 'application/vnd.americandynamics.acc',
250
- ami: 'application/vnd.amiga.ami',
251
- apk: 'application/vnd.android.package-archive',
252
- cii: 'application/vnd.anser-web-certificate-issue-initiation',
253
- fti: 'application/vnd.anser-web-funds-transfer-initiation',
254
- atx: 'application/vnd.antix.game-component',
255
- mpkg: 'application/vnd.apple.installer+xml',
256
- key: 'application/x-iwork-keynote-sffkey',
257
- m3u8: 'application/vnd.apple.mpegurl',
258
- numbers: 'application/x-iwork-numbers-sffnumbers',
259
- pages: 'application/x-iwork-pages-sffpages',
260
- pkpass: 'application/vnd.apple.pkpass',
261
- swi: 'application/vnd.aristanetworks.swi',
262
- iota: 'application/vnd.astraea-software.iota',
263
- aep: 'application/vnd.audiograph',
264
- bmml: 'application/vnd.balsamiq.bmml+xml',
265
- mpm: 'application/vnd.blueice.multipass',
266
- bmi: 'application/vnd.bmi',
267
- rep: 'application/vnd.businessobjects',
268
- cdxml: 'application/vnd.chemdraw+xml',
269
- mmd: 'application/vnd.chipnuts.karaoke-mmd',
270
- cdy: 'application/vnd.cinderella',
271
- csl: 'application/vnd.citationstyles.style+xml',
272
- cla: 'application/vnd.claymore',
273
- rp9: 'application/vnd.cloanto.rp9',
274
- c4g: 'application/vnd.clonk.c4group',
275
- c4d: 'application/vnd.clonk.c4group',
276
- c4f: 'application/vnd.clonk.c4group',
277
- c4p: 'application/vnd.clonk.c4group',
278
- c4u: 'application/vnd.clonk.c4group',
279
- c11amc: 'application/vnd.cluetrust.cartomobile-config',
280
- c11amz: 'application/vnd.cluetrust.cartomobile-config-pkg',
281
- csp: 'application/vnd.commonspace',
282
- cdbcmsg: 'application/vnd.contact.cmsg',
283
- cmc: 'application/vnd.cosmocaller',
284
- clkx: 'application/vnd.crick.clicker',
285
- clkk: 'application/vnd.crick.clicker.keyboard',
286
- clkp: 'application/vnd.crick.clicker.palette',
287
- clkt: 'application/vnd.crick.clicker.template',
288
- clkw: 'application/vnd.crick.clicker.wordbank',
289
- wbs: 'application/vnd.criticaltools.wbs+xml',
290
- pml: 'application/vnd.ctc-posml',
291
- ppd: 'application/vnd.cups-ppd',
292
- car: 'application/vnd.curl.car',
293
- pcurl: 'application/vnd.curl.pcurl',
294
- dart: 'application/vnd.dart',
295
- rdz: 'application/vnd.data-vision.rdz',
296
- dbf: 'application/vnd.dbf',
297
- uvf: 'application/vnd.dece.data',
298
- uvvf: 'application/vnd.dece.data',
299
- uvd: 'application/vnd.dece.data',
300
- uvvd: 'application/vnd.dece.data',
301
- uvt: 'application/vnd.dece.ttml+xml',
302
- uvvt: 'application/vnd.dece.ttml+xml',
303
- uvx: 'application/vnd.dece.unspecified',
304
- uvvx: 'application/vnd.dece.unspecified',
305
- uvz: 'application/vnd.dece.zip',
306
- uvvz: 'application/vnd.dece.zip',
307
- fe_launch: 'application/vnd.denovo.fcselayout-link',
308
- dna: 'application/vnd.dna',
309
- mlp: 'application/vnd.dolby.mlp',
310
- dpg: 'application/vnd.dpgraph',
311
- dfac: 'application/vnd.dreamfactory',
312
- kpxx: 'application/vnd.ds-keypoint',
313
- ait: 'application/vnd.dvb.ait',
314
- svc: 'application/vnd.dvb.service',
315
- geo: 'application/vnd.dynageo',
316
- mag: 'application/vnd.ecowin.chart',
317
- nml: 'application/vnd.enliven',
318
- esf: 'application/vnd.epson.esf',
319
- msf: 'application/vnd.epson.msf',
320
- qam: 'application/vnd.epson.quickanime',
321
- slt: 'application/vnd.epson.salt',
322
- ssf: 'application/vnd.epson.ssf',
323
- es3: 'application/vnd.eszigno3+xml',
324
- et3: 'application/vnd.eszigno3+xml',
325
- ez2: 'application/vnd.ezpix-album',
326
- ez3: 'application/vnd.ezpix-package',
327
- mseed: 'application/vnd.fdsn.mseed',
328
- seed: 'application/vnd.fdsn.seed',
329
- dataless: 'application/vnd.fdsn.seed',
330
- gph: 'application/vnd.flographit',
331
- ftc: 'application/vnd.fluxtime.clip',
332
- fm: 'application/vnd.framemaker',
333
- frame: 'application/vnd.framemaker',
334
- maker: 'application/vnd.framemaker',
335
- book: 'application/vnd.framemaker',
336
- fnc: 'application/vnd.frogans.fnc',
337
- ltf: 'application/vnd.frogans.ltf',
338
- fsc: 'application/vnd.fsc.weblaunch',
339
- oas: 'application/vnd.fujitsu.oasys',
340
- oa2: 'application/vnd.fujitsu.oasys2',
341
- oa3: 'application/vnd.fujitsu.oasys3',
342
- fg5: 'application/vnd.fujitsu.oasysgp',
343
- bh2: 'application/vnd.fujitsu.oasysprs',
344
- ddd: 'application/vnd.fujixerox.ddd',
345
- xdw: 'application/vnd.fujixerox.docuworks',
346
- xbd: 'application/vnd.fujixerox.docuworks.binder',
347
- fzs: 'application/vnd.fuzzysheet',
348
- txd: 'application/vnd.genomatix.tuxedo',
349
- ggb: 'application/vnd.geogebra.file',
350
- ggt: 'application/vnd.geogebra.tool',
351
- gex: 'application/vnd.geometry-explorer',
352
- gre: 'application/vnd.geometry-explorer',
353
- gxt: 'application/vnd.geonext',
354
- g2w: 'application/vnd.geoplan',
355
- g3w: 'application/vnd.geospace',
356
- gmx: 'application/vnd.gmx',
357
- gdoc: 'application/vnd.google-apps.document',
358
- gslides: 'application/vnd.google-apps.presentation',
359
- gsheet: 'application/vnd.google-apps.spreadsheet',
360
- kml: 'application/vnd.google-earth.kml+xml',
361
- kmz: 'application/vnd.google-earth.kmz',
362
- gqf: 'application/vnd.grafeq',
363
- gqs: 'application/vnd.grafeq',
364
- gac: 'application/vnd.groove-account',
365
- ghf: 'application/vnd.groove-help',
366
- gim: 'application/vnd.groove-identity-message',
367
- grv: 'application/vnd.groove-injector',
368
- gtm: 'application/vnd.groove-tool-message',
369
- tpl: 'application/vnd.groove-tool-template',
370
- vcg: 'application/vnd.groove-vcard',
371
- hal: 'application/vnd.hal+xml',
372
- zmm: 'application/vnd.handheld-entertainment+xml',
373
- hbci: 'application/vnd.hbci',
374
- les: 'application/vnd.hhe.lesson-player',
375
- hpgl: 'application/vnd.hp-hpgl',
376
- hpid: 'application/vnd.hp-hpid',
377
- hps: 'application/vnd.hp-hps',
378
- jlt: 'application/vnd.hp-jlyt',
379
- pcl: 'application/vnd.hp-pcl',
380
- pclxl: 'application/vnd.hp-pclxl',
381
- 'sfd-hdstx': 'application/vnd.hydrostatix.sof-data',
382
- mpy: 'application/vnd.ibm.minipay',
383
- afp: 'application/vnd.ibm.modcap',
384
- listafp: 'application/vnd.ibm.modcap',
385
- list3820: 'application/vnd.ibm.modcap',
386
- irm: 'application/vnd.ibm.rights-management',
387
- sc: 'application/vnd.ibm.secure-container',
388
- icc: 'application/vnd.iccprofile',
389
- icm: 'application/vnd.iccprofile',
390
- igl: 'application/vnd.igloader',
391
- ivp: 'application/vnd.immervision-ivp',
392
- ivu: 'application/vnd.immervision-ivu',
393
- igm: 'application/vnd.insors.igm',
394
- xpw: 'application/vnd.intercon.formnet',
395
- xpx: 'application/vnd.intercon.formnet',
396
- i2g: 'application/vnd.intergeo',
397
- qbo: 'application/vnd.intu.qbo',
398
- qfx: 'application/vnd.intu.qfx',
399
- rcprofile: 'application/vnd.ipunplugged.rcprofile',
400
- irp: 'application/vnd.irepository.package+xml',
401
- xpr: 'application/vnd.is-xpr',
402
- fcs: 'application/vnd.isac.fcs',
403
- jam: 'application/vnd.jam',
404
- rms: 'application/vnd.jcp.javame.midlet-rms',
405
- jisp: 'application/vnd.jisp',
406
- joda: 'application/vnd.joost.joda-archive',
407
- ktz: 'application/vnd.kahootz',
408
- ktr: 'application/vnd.kahootz',
409
- karbon: 'application/vnd.kde.karbon',
410
- chrt: 'application/vnd.kde.kchart',
411
- kfo: 'application/vnd.kde.kformula',
412
- flw: 'application/vnd.kde.kivio',
413
- kon: 'application/vnd.kde.kontour',
414
- kpr: 'application/vnd.kde.kpresenter',
415
- kpt: 'application/vnd.kde.kpresenter',
416
- ksp: 'application/vnd.kde.kspread',
417
- kwd: 'application/vnd.kde.kword',
418
- kwt: 'application/vnd.kde.kword',
419
- htke: 'application/vnd.kenameaapp',
420
- kia: 'application/vnd.kidspiration',
421
- kne: 'application/vnd.kinar',
422
- knp: 'application/vnd.kinar',
423
- skp: 'application/vnd.koan',
424
- skd: 'application/vnd.koan',
425
- skt: 'application/vnd.koan',
426
- skm: 'application/vnd.koan',
427
- sse: 'application/vnd.kodak-descriptor',
428
- lasxml: 'application/vnd.las.las+xml',
429
- lbd: 'application/vnd.llamagraphics.life-balance.desktop',
430
- lbe: 'application/vnd.llamagraphics.life-balance.exchange+xml',
431
- apr: 'application/vnd.lotus-approach',
432
- pre: 'application/vnd.lotus-freelance',
433
- nsf: 'application/vnd.lotus-notes',
434
- org: 'text/x-org',
435
- scm: 'application/vnd.lotus-screencam',
436
- lwp: 'application/vnd.lotus-wordpro',
437
- portpkg: 'application/vnd.macports.portpkg',
438
- mvt: 'application/vnd.mapbox-vector-tile',
439
- mcd: 'application/vnd.mcd',
440
- mc1: 'application/vnd.medcalcdata',
441
- cdkey: 'application/vnd.mediastation.cdkey',
442
- mwf: 'application/vnd.mfer',
443
- mfm: 'application/vnd.mfmp',
444
- flo: 'application/vnd.micrografx.flo',
445
- igx: 'application/vnd.micrografx.igx',
446
- mif: 'application/vnd.mif',
447
- daf: 'application/vnd.mobius.daf',
448
- dis: 'application/vnd.mobius.dis',
449
- mbk: 'application/vnd.mobius.mbk',
450
- mqy: 'application/vnd.mobius.mqy',
451
- msl: 'application/vnd.mobius.msl',
452
- plc: 'application/vnd.mobius.plc',
453
- txf: 'application/vnd.mobius.txf',
454
- mpn: 'application/vnd.mophun.application',
455
- mpc: 'application/vnd.mophun.certificate',
456
- xul: 'application/vnd.mozilla.xul+xml',
457
- cil: 'application/vnd.ms-artgalry',
458
- cab: 'application/vnd.ms-cab-compressed',
459
- xls: 'application/vnd.ms-excel',
460
- xlm: 'application/vnd.ms-excel',
461
- xla: 'application/vnd.ms-excel',
462
- xlc: 'application/vnd.ms-excel',
463
- xlt: 'application/vnd.ms-excel',
464
- xlw: 'application/vnd.ms-excel',
465
- xlam: 'application/vnd.ms-excel.addin.macroenabled.12',
466
- xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
467
- xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',
468
- xltm: 'application/vnd.ms-excel.template.macroenabled.12',
469
- eot: 'application/vnd.ms-fontobject',
470
- chm: 'application/vnd.ms-htmlhelp',
471
- ims: 'application/vnd.ms-ims',
472
- lrm: 'application/vnd.ms-lrm',
473
- thmx: 'application/vnd.ms-officetheme',
474
- msg: 'application/vnd.ms-outlook',
475
- cat: 'application/vnd.ms-pki.seccat',
476
- stl: 'model/stl',
477
- ppt: 'application/vnd.ms-powerpoint',
478
- pps: 'application/vnd.ms-powerpoint',
479
- pot: 'application/vnd.ms-powerpoint',
480
- ppam: 'application/vnd.ms-powerpoint.addin.macroenabled.12',
481
- pptm: 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
482
- sldm: 'application/vnd.ms-powerpoint.slide.macroenabled.12',
483
- ppsm: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
484
- potm: 'application/vnd.ms-powerpoint.template.macroenabled.12',
485
- mpt: 'application/vnd.ms-project',
486
- docm: 'application/vnd.ms-word.document.macroenabled.12',
487
- dotm: 'application/vnd.ms-word.template.macroenabled.12',
488
- wps: 'application/vnd.ms-works',
489
- wks: 'application/vnd.ms-works',
490
- wcm: 'application/vnd.ms-works',
491
- wdb: 'application/vnd.ms-works',
492
- wpl: 'application/vnd.ms-wpl',
493
- xps: 'application/vnd.ms-xpsdocument',
494
- mseq: 'application/vnd.mseq',
495
- mus: 'application/vnd.musician',
496
- msty: 'application/vnd.muvee.style',
497
- taglet: 'application/vnd.mynfc',
498
- nlu: 'application/vnd.neurolanguage.nlu',
499
- ntf: 'application/vnd.nitf',
500
- nitf: 'application/vnd.nitf',
501
- nnd: 'application/vnd.noblenet-directory',
502
- nns: 'application/vnd.noblenet-sealer',
503
- nnw: 'application/vnd.noblenet-web',
504
- ngdat: 'application/vnd.nokia.n-gage.data',
505
- 'n-gage': 'application/vnd.nokia.n-gage.symbian.install',
506
- rpst: 'application/vnd.nokia.radio-preset',
507
- rpss: 'application/vnd.nokia.radio-presets',
508
- edm: 'application/vnd.novadigm.edm',
509
- edx: 'application/vnd.novadigm.edx',
510
- ext: 'application/vnd.novadigm.ext',
511
- odc: 'application/vnd.oasis.opendocument.chart',
512
- otc: 'application/vnd.oasis.opendocument.chart-template',
513
- odb: 'application/vnd.oasis.opendocument.database',
514
- odf: 'application/vnd.oasis.opendocument.formula',
515
- odft: 'application/vnd.oasis.opendocument.formula-template',
516
- odg: 'application/vnd.oasis.opendocument.graphics',
517
- otg: 'application/vnd.oasis.opendocument.graphics-template',
518
- odi: 'application/vnd.oasis.opendocument.image',
519
- oti: 'application/vnd.oasis.opendocument.image-template',
520
- odp: 'application/vnd.oasis.opendocument.presentation',
521
- otp: 'application/vnd.oasis.opendocument.presentation-template',
522
- ods: 'application/vnd.oasis.opendocument.spreadsheet',
523
- ots: 'application/vnd.oasis.opendocument.spreadsheet-template',
524
- odt: 'application/vnd.oasis.opendocument.text',
525
- odm: 'application/vnd.oasis.opendocument.text-master',
526
- ott: 'application/vnd.oasis.opendocument.text-template',
527
- oth: 'application/vnd.oasis.opendocument.text-web',
528
- xo: 'application/vnd.olpc-sugar',
529
- dd2: 'application/vnd.oma.dd2+xml',
530
- obgx: 'application/vnd.openblox.game+xml',
531
- oxt: 'application/vnd.openofficeorg.extension',
532
- osm: 'application/vnd.openstreetmap.data+xml',
533
- pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
534
- sldx: 'application/vnd.openxmlformats-officedocument.presentationml.slide',
535
- ppsx: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
536
- potx: 'application/vnd.openxmlformats-officedocument.presentationml.template',
537
- xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
538
- xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
539
- docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
540
- dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
541
- mgp: 'application/vnd.osgeo.mapguide.package',
542
- dp: 'application/vnd.osgi.dp',
543
- esa: 'application/vnd.osgi.subsystem',
544
- pdb: 'application/x-pilot',
545
- pqa: 'application/vnd.palm',
546
- oprc: 'application/vnd.palm',
547
- paw: 'application/vnd.pawaafile',
548
- str: 'application/vnd.pg.format',
549
- ei6: 'application/vnd.pg.osasli',
550
- efif: 'application/vnd.picsel',
551
- wg: 'application/vnd.pmi.widget',
552
- plf: 'application/vnd.pocketlearn',
553
- pbd: 'application/vnd.powerbuilder6',
554
- box: 'application/vnd.previewsystems.box',
555
- mgz: 'application/vnd.proteus.magazine',
556
- qps: 'application/vnd.publishare-delta-tree',
557
- ptid: 'application/vnd.pvi.ptid1',
558
- qxd: 'application/vnd.quark.quarkxpress',
559
- qxt: 'application/vnd.quark.quarkxpress',
560
- qwd: 'application/vnd.quark.quarkxpress',
561
- qwt: 'application/vnd.quark.quarkxpress',
562
- qxl: 'application/vnd.quark.quarkxpress',
563
- qxb: 'application/vnd.quark.quarkxpress',
564
- rar: 'application/x-rar-compressed',
565
- bed: 'application/vnd.realvnc.bed',
566
- mxl: 'application/vnd.recordare.musicxml',
567
- musicxml: 'application/vnd.recordare.musicxml+xml',
568
- cryptonote: 'application/vnd.rig.cryptonote',
569
- cod: 'application/vnd.rim.cod',
570
- rm: 'application/vnd.rn-realmedia',
571
- rmvb: 'application/vnd.rn-realmedia-vbr',
572
- link66: 'application/vnd.route66.link66+xml',
573
- st: 'application/vnd.sailingtracker.track',
574
- see: 'application/vnd.seemail',
575
- sema: 'application/vnd.sema',
576
- semd: 'application/vnd.semd',
577
- semf: 'application/vnd.semf',
578
- ifm: 'application/vnd.shana.informed.formdata',
579
- itp: 'application/vnd.shana.informed.formtemplate',
580
- iif: 'application/vnd.shana.informed.interchange',
581
- ipk: 'application/vnd.shana.informed.package',
582
- twd: 'application/vnd.simtech-mindmapper',
583
- twds: 'application/vnd.simtech-mindmapper',
584
- mmf: 'application/vnd.smaf',
585
- teacher: 'application/vnd.smart.teacher',
586
- fo: 'application/vnd.software602.filler.form+xml',
587
- sdkm: 'application/vnd.solent.sdkm+xml',
588
- sdkd: 'application/vnd.solent.sdkm+xml',
589
- dxp: 'application/vnd.spotfire.dxp',
590
- sfs: 'application/vnd.spotfire.sfs',
591
- sdc: 'application/vnd.stardivision.calc',
592
- sda: 'application/vnd.stardivision.draw',
593
- sdd: 'application/vnd.stardivision.impress',
594
- smf: 'application/vnd.stardivision.math',
595
- sdw: 'application/vnd.stardivision.writer',
596
- vor: 'application/vnd.stardivision.writer',
597
- sgl: 'application/vnd.stardivision.writer-global',
598
- smzip: 'application/vnd.stepmania.package',
599
- sm: 'application/vnd.stepmania.stepchart',
600
- wadl: 'application/vnd.sun.wadl+xml',
601
- sxc: 'application/vnd.sun.xml.calc',
602
- stc: 'application/vnd.sun.xml.calc.template',
603
- sxd: 'application/vnd.sun.xml.draw',
604
- std: 'application/vnd.sun.xml.draw.template',
605
- sxi: 'application/vnd.sun.xml.impress',
606
- sti: 'application/vnd.sun.xml.impress.template',
607
- sxm: 'application/vnd.sun.xml.math',
608
- sxw: 'application/vnd.sun.xml.writer',
609
- sxg: 'application/vnd.sun.xml.writer.global',
610
- stw: 'application/vnd.sun.xml.writer.template',
611
- sus: 'application/vnd.sus-calendar',
612
- susp: 'application/vnd.sus-calendar',
613
- svd: 'application/vnd.svd',
614
- sis: 'application/vnd.symbian.install',
615
- sisx: 'application/vnd.symbian.install',
616
- xsm: 'application/vnd.syncml+xml',
617
- bdm: 'application/vnd.syncml.dm+wbxml',
618
- xdm: 'application/vnd.syncml.dm+xml',
619
- ddf: 'application/vnd.syncml.dmddf+xml',
620
- tao: 'application/vnd.tao.intent-module-archive',
621
- pcap: 'application/vnd.tcpdump.pcap',
622
- cap: 'application/vnd.tcpdump.pcap',
623
- dmp: 'application/vnd.tcpdump.pcap',
624
- tmo: 'application/vnd.tmobile-livetv',
625
- tpt: 'application/vnd.trid.tpt',
626
- mxs: 'application/vnd.triscape.mxs',
627
- tra: 'application/vnd.trueapp',
628
- ufd: 'application/vnd.ufdl',
629
- ufdl: 'application/vnd.ufdl',
630
- utz: 'application/vnd.uiq.theme',
631
- umj: 'application/vnd.umajin',
632
- unityweb: 'application/vnd.unity',
633
- uoml: 'application/vnd.uoml+xml',
634
- vcx: 'application/vnd.vcx',
635
- vsd: 'application/vnd.visio',
636
- vst: 'application/vnd.visio',
637
- vss: 'application/vnd.visio',
638
- vsw: 'application/vnd.visio',
639
- vis: 'application/vnd.visionary',
640
- vsf: 'application/vnd.vsf',
641
- wbxml: 'application/vnd.wap.wbxml',
642
- wmlc: 'application/vnd.wap.wmlc',
643
- wmlsc: 'application/vnd.wap.wmlscriptc',
644
- wtb: 'application/vnd.webturbo',
645
- nbp: 'application/vnd.wolfram.player',
646
- wpd: 'application/vnd.wordperfect',
647
- wqd: 'application/vnd.wqd',
648
- stf: 'application/vnd.wt.stf',
649
- xar: 'application/vnd.xara',
650
- xfdl: 'application/vnd.xfdl',
651
- hvd: 'application/vnd.yamaha.hv-dic',
652
- hvs: 'application/vnd.yamaha.hv-script',
653
- hvp: 'application/vnd.yamaha.hv-voice',
654
- osf: 'application/vnd.yamaha.openscoreformat',
655
- osfpvg: 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
656
- saf: 'application/vnd.yamaha.smaf-audio',
657
- spf: 'application/vnd.yamaha.smaf-phrase',
658
- cmp: 'application/vnd.yellowriver-custom-menu',
659
- zir: 'application/vnd.zul',
660
- zirz: 'application/vnd.zul',
661
- zaz: 'application/vnd.zzazz.deck+xml',
662
- vxml: 'application/voicexml+xml',
663
- wasm: 'application/wasm',
664
- wif: 'application/watcherinfo+xml',
665
- wgt: 'application/widget',
666
- hlp: 'application/winhlp',
667
- wsdl: 'application/wsdl+xml',
668
- wspolicy: 'application/wspolicy+xml',
669
- '7z': 'application/x-7z-compressed',
670
- abw: 'application/x-abiword',
671
- ace: 'application/x-ace-compressed',
672
- arj: 'application/x-arj',
673
- aab: 'application/x-authorware-bin',
674
- x32: 'application/x-authorware-bin',
675
- u32: 'application/x-authorware-bin',
676
- vox: 'application/x-authorware-bin',
677
- aam: 'application/x-authorware-map',
678
- aas: 'application/x-authorware-seg',
679
- bcpio: 'application/x-bcpio',
680
- torrent: 'application/x-bittorrent',
681
- blb: 'application/x-blorb',
682
- blorb: 'application/x-blorb',
683
- bz: 'application/x-bzip',
684
- bz2: 'application/x-bzip2',
685
- boz: 'application/x-bzip2',
686
- cbr: 'application/x-cbr',
687
- cba: 'application/x-cbr',
688
- cbt: 'application/x-cbr',
689
- cbz: 'application/x-cbr',
690
- cb7: 'application/x-cbr',
691
- vcd: 'application/x-cdlink',
692
- cfs: 'application/x-cfs-compressed',
693
- chat: 'application/x-chat',
694
- pgn: 'application/x-chess-pgn',
695
- crx: 'application/x-chrome-extension',
696
- cco: 'application/x-cocoa',
697
- nsc: 'application/x-conference',
698
- cpio: 'application/x-cpio',
699
- csh: 'application/x-csh',
700
- udeb: 'application/x-debian-package',
701
- dgc: 'application/x-dgc-compressed',
702
- dir: 'application/x-director',
703
- dcr: 'application/x-director',
704
- dxr: 'application/x-director',
705
- cst: 'application/x-director',
706
- cct: 'application/x-director',
707
- cxt: 'application/x-director',
708
- w3d: 'application/x-director',
709
- fgd: 'application/x-director',
710
- swa: 'application/x-director',
711
- wad: 'application/x-doom',
712
- ncx: 'application/x-dtbncx+xml',
713
- dtb: 'application/x-dtbook+xml',
714
- res: 'application/x-dtbresource+xml',
715
- dvi: 'application/x-dvi',
716
- evy: 'application/x-envoy',
717
- eva: 'application/x-eva',
718
- bdf: 'application/x-font-bdf',
719
- gsf: 'application/x-font-ghostscript',
720
- psf: 'application/x-font-linux-psf',
721
- pcf: 'application/x-font-pcf',
722
- snf: 'application/x-font-snf',
723
- pfa: 'application/x-font-type1',
724
- pfb: 'application/x-font-type1',
725
- pfm: 'application/x-font-type1',
726
- afm: 'application/x-font-type1',
727
- arc: 'application/x-freearc',
728
- spl: 'application/x-futuresplash',
729
- gca: 'application/x-gca-compressed',
730
- ulx: 'application/x-glulx',
731
- gnumeric: 'application/x-gnumeric',
732
- gramps: 'application/x-gramps-xml',
733
- gtar: 'application/x-gtar',
734
- hdf: 'application/x-hdf',
735
- php: 'application/x-httpd-php',
736
- install: 'application/x-install-instructions',
737
- jardiff: 'application/x-java-archive-diff',
738
- jnlp: 'application/x-java-jnlp-file',
739
- kdbx: 'application/x-keepass2',
740
- latex: 'application/x-latex',
741
- luac: 'application/x-lua-bytecode',
742
- lzh: 'application/x-lzh-compressed',
743
- lha: 'application/x-lzh-compressed',
744
- run: 'application/x-makeself',
745
- mie: 'application/x-mie',
746
- prc: 'model/prc',
747
- mobi: 'application/x-mobipocket-ebook',
748
- application: 'application/x-ms-application',
749
- lnk: 'application/x-ms-shortcut',
750
- wmd: 'application/x-ms-wmd',
751
- wmz: 'application/x-msmetafile',
752
- xbap: 'application/x-ms-xbap',
753
- mdb: 'application/x-msaccess',
754
- obd: 'application/x-msbinder',
755
- crd: 'application/x-mscardfile',
756
- clp: 'application/x-msclip',
757
- com: 'application/x-msdownload',
758
- bat: 'application/x-msdownload',
759
- mvb: 'application/x-msmediaview',
760
- m13: 'application/x-msmediaview',
761
- m14: 'application/x-msmediaview',
762
- wmf: 'image/wmf',
763
- emf: 'image/emf',
764
- emz: 'application/x-msmetafile',
765
- mny: 'application/x-msmoney',
766
- pub: 'application/x-mspublisher',
767
- scd: 'application/x-msschedule',
768
- trm: 'application/x-msterminal',
769
- wri: 'application/x-mswrite',
770
- nc: 'application/x-netcdf',
771
- cdf: 'application/x-netcdf',
772
- pac: 'application/x-ns-proxy-autoconfig',
773
- nzb: 'application/x-nzb',
774
- pl: 'application/x-perl',
775
- pm: 'application/x-perl',
776
- p12: 'application/x-pkcs12',
777
- pfx: 'application/x-pkcs12',
778
- p7b: 'application/x-pkcs7-certificates',
779
- spc: 'application/x-pkcs7-certificates',
780
- p7r: 'application/x-pkcs7-certreqresp',
781
- rpm: 'application/x-redhat-package-manager',
782
- ris: 'application/x-research-info-systems',
783
- sea: 'application/x-sea',
784
- sh: 'application/x-sh',
785
- shar: 'application/x-shar',
786
- swf: 'application/x-shockwave-flash',
787
- xap: 'application/x-silverlight-app',
788
- sql: 'application/x-sql',
789
- sit: 'application/x-stuffit',
790
- sitx: 'application/x-stuffitx',
791
- srt: 'application/x-subrip',
792
- sv4cpio: 'application/x-sv4cpio',
793
- sv4crc: 'application/x-sv4crc',
794
- t3: 'application/x-t3vm-image',
795
- gam: 'application/x-tads',
796
- tar: 'application/x-tar',
797
- tcl: 'application/x-tcl',
798
- tk: 'application/x-tcl',
799
- tex: 'application/x-tex',
800
- tfm: 'application/x-tex-tfm',
801
- texinfo: 'application/x-texinfo',
802
- texi: 'application/x-texinfo',
803
- obj: 'model/obj',
804
- ustar: 'application/x-ustar',
805
- hdd: 'application/x-virtualbox-hdd',
806
- ova: 'application/x-virtualbox-ova',
807
- ovf: 'application/x-virtualbox-ovf',
808
- vbox: 'application/x-virtualbox-vbox',
809
- 'vbox-extpack': 'application/x-virtualbox-vbox-extpack',
810
- vdi: 'application/x-virtualbox-vdi',
811
- vhd: 'application/x-virtualbox-vhd',
812
- vmdk: 'application/x-virtualbox-vmdk',
813
- src: 'application/x-wais-source',
814
- webapp: 'application/x-web-app-manifest+json',
815
- der: 'application/x-x509-ca-cert',
816
- crt: 'application/x-x509-ca-cert',
817
- pem: 'application/x-x509-ca-cert',
818
- fig: 'application/x-xfig',
819
- xlf: 'application/xliff+xml',
820
- xpi: 'application/x-xpinstall',
821
- xz: 'application/x-xz',
822
- z1: 'application/x-zmachine',
823
- z2: 'application/x-zmachine',
824
- z3: 'application/x-zmachine',
825
- z4: 'application/x-zmachine',
826
- z5: 'application/x-zmachine',
827
- z6: 'application/x-zmachine',
828
- z7: 'application/x-zmachine',
829
- z8: 'application/x-zmachine',
830
- xaml: 'application/xaml+xml',
831
- xav: 'application/xcap-att+xml',
832
- xca: 'application/xcap-caps+xml',
833
- xdf: 'application/xcap-diff+xml',
834
- xel: 'application/xcap-el+xml',
835
- xns: 'application/xcap-ns+xml',
836
- xenc: 'application/xenc+xml',
837
- xhtml: 'application/xhtml+xml',
838
- xht: 'application/xhtml+xml',
839
- xml: 'text/xml',
840
- xsl: 'application/xslt+xml',
841
- xsd: 'application/xml',
842
- rng: 'application/xml',
843
- dtd: 'application/xml-dtd',
844
- xop: 'application/xop+xml',
845
- xpl: 'application/xproc+xml',
846
- xslt: 'application/xslt+xml',
847
- xspf: 'application/xspf+xml',
848
- mxml: 'application/xv+xml',
849
- xhvml: 'application/xv+xml',
850
- xvml: 'application/xv+xml',
851
- xvm: 'application/xv+xml',
852
- yang: 'application/yang',
853
- yin: 'application/yin+xml',
854
- zip: 'application/zip',
855
- '3gpp': 'video/3gpp',
856
- adp: 'audio/adpcm',
857
- amr: 'audio/amr',
858
- au: 'audio/basic',
859
- snd: 'audio/basic',
860
- mid: 'audio/midi',
861
- midi: 'audio/midi',
862
- kar: 'audio/midi',
863
- rmi: 'audio/midi',
864
- mxmf: 'audio/mobile-xmf',
865
- mp3: 'audio/mpeg',
866
- m4a: 'audio/x-m4a',
867
- mp4a: 'audio/mp4',
868
- mpga: 'audio/mpeg',
869
- mp2: 'audio/mpeg',
870
- mp2a: 'audio/mpeg',
871
- m2a: 'audio/mpeg',
872
- m3a: 'audio/mpeg',
873
- oga: 'audio/ogg',
874
- ogg: 'audio/ogg',
875
- spx: 'audio/ogg',
876
- opus: 'audio/ogg',
877
- s3m: 'audio/s3m',
878
- sil: 'audio/silk',
879
- uva: 'audio/vnd.dece.audio',
880
- uvva: 'audio/vnd.dece.audio',
881
- eol: 'audio/vnd.digital-winds',
882
- dra: 'audio/vnd.dra',
883
- dts: 'audio/vnd.dts',
884
- dtshd: 'audio/vnd.dts.hd',
885
- lvp: 'audio/vnd.lucent.voice',
886
- pya: 'audio/vnd.ms-playready.media.pya',
887
- ecelp4800: 'audio/vnd.nuera.ecelp4800',
888
- ecelp7470: 'audio/vnd.nuera.ecelp7470',
889
- ecelp9600: 'audio/vnd.nuera.ecelp9600',
890
- rip: 'audio/vnd.rip',
891
- wav: 'audio/x-wav',
892
- weba: 'audio/webm',
893
- aac: 'audio/x-aac',
894
- aif: 'audio/x-aiff',
895
- aiff: 'audio/x-aiff',
896
- aifc: 'audio/x-aiff',
897
- caf: 'audio/x-caf',
898
- flac: 'audio/x-flac',
899
- mka: 'audio/x-matroska',
900
- m3u: 'audio/x-mpegurl',
901
- wax: 'audio/x-ms-wax',
902
- wma: 'audio/x-ms-wma',
903
- ram: 'audio/x-pn-realaudio',
904
- ra: 'audio/x-realaudio',
905
- rmp: 'audio/x-pn-realaudio-plugin',
906
- xm: 'audio/xm',
907
- cdx: 'chemical/x-cdx',
908
- cif: 'chemical/x-cif',
909
- cmdf: 'chemical/x-cmdf',
910
- cml: 'chemical/x-cml',
911
- csml: 'chemical/x-csml',
912
- xyz: 'chemical/x-xyz',
913
- ttc: 'font/collection',
914
- otf: 'font/otf',
915
- ttf: 'font/ttf',
916
- woff: 'font/woff',
917
- woff2: 'font/woff2',
918
- exr: 'image/aces',
919
- apng: 'image/apng',
920
- avci: 'image/avci',
921
- avcs: 'image/avcs',
922
- avif: 'image/avif',
923
- bmp: 'image/x-ms-bmp',
924
- cgm: 'image/cgm',
925
- drle: 'image/dicom-rle',
926
- fits: 'image/fits',
927
- g3: 'image/g3fax',
928
- gif: 'image/gif',
929
- heic: 'image/heic',
930
- heics: 'image/heic-sequence',
931
- heif: 'image/heif',
932
- heifs: 'image/heif-sequence',
933
- hej2: 'image/hej2k',
934
- hsj2: 'image/hsj2',
935
- ief: 'image/ief',
936
- jls: 'image/jls',
937
- jp2: 'image/jp2',
938
- jpg2: 'image/jp2',
939
- jpeg: 'image/jpeg',
940
- jpg: 'image/jpeg',
941
- jpe: 'image/jpeg',
942
- jph: 'image/jph',
943
- jhc: 'image/jphc',
944
- jpm: 'video/jpm',
945
- jpx: 'image/jpx',
946
- jpf: 'image/jpx',
947
- jxr: 'image/jxr',
948
- jxra: 'image/jxra',
949
- jxrs: 'image/jxrs',
950
- jxs: 'image/jxs',
951
- jxsc: 'image/jxsc',
952
- jxsi: 'image/jxsi',
953
- jxss: 'image/jxss',
954
- ktx: 'image/ktx',
955
- ktx2: 'image/ktx2',
956
- png: 'image/png',
957
- btif: 'image/prs.btif',
958
- pti: 'image/prs.pti',
959
- sgi: 'image/sgi',
960
- svg: 'image/svg+xml',
961
- svgz: 'image/svg+xml',
962
- t38: 'image/t38',
963
- tif: 'image/tiff',
964
- tiff: 'image/tiff',
965
- tfx: 'image/tiff-fx',
966
- psd: 'image/vnd.adobe.photoshop',
967
- azv: 'image/vnd.airzip.accelerator.azv',
968
- uvi: 'image/vnd.dece.graphic',
969
- uvvi: 'image/vnd.dece.graphic',
970
- uvg: 'image/vnd.dece.graphic',
971
- uvvg: 'image/vnd.dece.graphic',
972
- djvu: 'image/vnd.djvu',
973
- djv: 'image/vnd.djvu',
974
- sub: 'text/vnd.dvb.subtitle',
975
- dwg: 'image/vnd.dwg',
976
- dxf: 'image/vnd.dxf',
977
- fbs: 'image/vnd.fastbidsheet',
978
- fpx: 'image/vnd.fpx',
979
- fst: 'image/vnd.fst',
980
- mmr: 'image/vnd.fujixerox.edmics-mmr',
981
- rlc: 'image/vnd.fujixerox.edmics-rlc',
982
- ico: 'image/x-icon',
983
- dds: 'image/vnd.ms-dds',
984
- mdi: 'image/vnd.ms-modi',
985
- wdp: 'image/vnd.ms-photo',
986
- npx: 'image/vnd.net-fpx',
987
- b16: 'image/vnd.pco.b16',
988
- tap: 'image/vnd.tencent.tap',
989
- vtf: 'image/vnd.valve.source.texture',
990
- wbmp: 'image/vnd.wap.wbmp',
991
- xif: 'image/vnd.xiff',
992
- pcx: 'image/x-pcx',
993
- webp: 'image/webp',
994
- '3ds': 'image/x-3ds',
995
- ras: 'image/x-cmu-raster',
996
- cmx: 'image/x-cmx',
997
- fh: 'image/x-freehand',
998
- fhc: 'image/x-freehand',
999
- fh4: 'image/x-freehand',
1000
- fh5: 'image/x-freehand',
1001
- fh7: 'image/x-freehand',
1002
- jng: 'image/x-jng',
1003
- sid: 'image/x-mrsid-image',
1004
- pic: 'image/x-pict',
1005
- pct: 'image/x-pict',
1006
- pnm: 'image/x-portable-anymap',
1007
- pbm: 'image/x-portable-bitmap',
1008
- pgm: 'image/x-portable-graymap',
1009
- ppm: 'image/x-portable-pixmap',
1010
- rgb: 'image/x-rgb',
1011
- tga: 'image/x-tga',
1012
- xbm: 'image/x-xbitmap',
1013
- xpm: 'image/x-xpixmap',
1014
- xwd: 'image/x-xwindowdump',
1015
- 'disposition-notification': 'message/disposition-notification',
1016
- u8msg: 'message/global',
1017
- u8dsn: 'message/global-delivery-status',
1018
- u8mdn: 'message/global-disposition-notification',
1019
- u8hdr: 'message/global-headers',
1020
- eml: 'message/rfc822',
1021
- mime: 'message/rfc822',
1022
- wsc: 'message/vnd.wfa.wsc',
1023
- '3mf': 'model/3mf',
1024
- gltf: 'model/gltf+json',
1025
- glb: 'model/gltf-binary',
1026
- igs: 'model/iges',
1027
- iges: 'model/iges',
1028
- msh: 'model/mesh',
1029
- mesh: 'model/mesh',
1030
- silo: 'model/mesh',
1031
- mtl: 'model/mtl',
1032
- stpx: 'model/step+xml',
1033
- stpz: 'model/step+zip',
1034
- stpxz: 'model/step-xml+zip',
1035
- u3d: 'model/u3d',
1036
- dae: 'model/vnd.collada+xml',
1037
- dwf: 'model/vnd.dwf',
1038
- gdl: 'model/vnd.gdl',
1039
- gtw: 'model/vnd.gtw',
1040
- mts: 'model/vnd.mts',
1041
- ogex: 'model/vnd.opengex',
1042
- x_b: 'model/vnd.parasolid.transmit.binary',
1043
- x_t: 'model/vnd.parasolid.transmit.text',
1044
- vds: 'model/vnd.sap.vds',
1045
- usdz: 'model/vnd.usdz+zip',
1046
- bsp: 'model/vnd.valve.source.compiled-map',
1047
- vtu: 'model/vnd.vtu',
1048
- wrl: 'model/vrml',
1049
- vrml: 'model/vrml',
1050
- x3db: 'model/x3d+fastinfoset',
1051
- x3dbz: 'model/x3d+binary',
1052
- x3dv: 'model/x3d-vrml',
1053
- x3dvz: 'model/x3d+vrml',
1054
- x3d: 'model/x3d+xml',
1055
- x3dz: 'model/x3d+xml',
1056
- appcache: 'text/cache-manifest',
1057
- manifest: 'text/cache-manifest',
1058
- ics: 'text/calendar',
1059
- ifb: 'text/calendar',
1060
- coffee: 'text/coffeescript',
1061
- litcoffee: 'text/coffeescript',
1062
- css: 'text/css',
1063
- csv: 'text/csv',
1064
- html: 'text/html',
1065
- htm: 'text/html',
1066
- shtml: 'text/html',
1067
- jade: 'text/jade',
1068
- jsx: 'text/jsx',
1069
- less: 'text/less',
1070
- markdown: 'text/markdown',
1071
- md: 'text/markdown',
1072
- mml: 'text/mathml',
1073
- mdx: 'text/mdx',
1074
- n3: 'text/n3',
1075
- txt: 'text/plain',
1076
- text: 'text/plain',
1077
- conf: 'text/plain',
1078
- def: 'text/plain',
1079
- list: 'text/plain',
1080
- log: 'text/plain',
1081
- in: 'text/plain',
1082
- ini: 'text/plain',
1083
- dsc: 'text/prs.lines.tag',
1084
- rtx: 'text/richtext',
1085
- sgml: 'text/sgml',
1086
- sgm: 'text/sgml',
1087
- shex: 'text/shex',
1088
- slim: 'text/slim',
1089
- slm: 'text/slim',
1090
- spdx: 'text/spdx',
1091
- stylus: 'text/stylus',
1092
- styl: 'text/stylus',
1093
- tsv: 'text/tab-separated-values',
1094
- t: 'text/troff',
1095
- tr: 'text/troff',
1096
- roff: 'text/troff',
1097
- man: 'text/troff',
1098
- me: 'text/troff',
1099
- ms: 'text/troff',
1100
- ttl: 'text/turtle',
1101
- uri: 'text/uri-list',
1102
- uris: 'text/uri-list',
1103
- urls: 'text/uri-list',
1104
- vcard: 'text/vcard',
1105
- curl: 'text/vnd.curl',
1106
- dcurl: 'text/vnd.curl.dcurl',
1107
- mcurl: 'text/vnd.curl.mcurl',
1108
- scurl: 'text/vnd.curl.scurl',
1109
- ged: 'text/vnd.familysearch.gedcom',
1110
- fly: 'text/vnd.fly',
1111
- flx: 'text/vnd.fmi.flexstor',
1112
- gv: 'text/vnd.graphviz',
1113
- '3dml': 'text/vnd.in3d.3dml',
1114
- spot: 'text/vnd.in3d.spot',
1115
- jad: 'text/vnd.sun.j2me.app-descriptor',
1116
- wml: 'text/vnd.wap.wml',
1117
- wmls: 'text/vnd.wap.wmlscript',
1118
- vtt: 'text/vtt',
1119
- s: 'text/x-asm',
1120
- asm: 'text/x-asm',
1121
- c: 'text/x-c',
1122
- cc: 'text/x-c',
1123
- cxx: 'text/x-c',
1124
- cpp: 'text/x-c',
1125
- h: 'text/x-c',
1126
- hh: 'text/x-c',
1127
- dic: 'text/x-c',
1128
- htc: 'text/x-component',
1129
- f: 'text/x-fortran',
1130
- for: 'text/x-fortran',
1131
- f77: 'text/x-fortran',
1132
- f90: 'text/x-fortran',
1133
- hbs: 'text/x-handlebars-template',
1134
- java: 'text/x-java-source',
1135
- lua: 'text/x-lua',
1136
- mkd: 'text/x-markdown',
1137
- nfo: 'text/x-nfo',
1138
- opml: 'text/x-opml',
1139
- p: 'text/x-pascal',
1140
- pas: 'text/x-pascal',
1141
- pde: 'text/x-processing',
1142
- sass: 'text/x-sass',
1143
- scss: 'text/x-scss',
1144
- etx: 'text/x-setext',
1145
- sfv: 'text/x-sfv',
1146
- ymp: 'text/x-suse-ymp',
1147
- uu: 'text/x-uuencode',
1148
- vcs: 'text/x-vcalendar',
1149
- vcf: 'text/x-vcard',
1150
- yaml: 'text/yaml',
1151
- yml: 'text/yaml',
1152
- '3gp': 'video/3gpp',
1153
- '3g2': 'video/3gpp2',
1154
- h261: 'video/h261',
1155
- h263: 'video/h263',
1156
- h264: 'video/h264',
1157
- m4s: 'video/iso.segment',
1158
- jpgv: 'video/jpeg',
1159
- jpgm: 'video/jpm',
1160
- mj2: 'video/mj2',
1161
- mjp2: 'video/mj2',
1162
- ts: 'video/mp2t',
1163
- mp4: 'video/mp4',
1164
- mp4v: 'video/mp4',
1165
- mpg4: 'video/mp4',
1166
- mpeg: 'video/mpeg',
1167
- mpg: 'video/mpeg',
1168
- mpe: 'video/mpeg',
1169
- m1v: 'video/mpeg',
1170
- m2v: 'video/mpeg',
1171
- ogv: 'video/ogg',
1172
- qt: 'video/quicktime',
1173
- mov: 'video/quicktime',
1174
- uvh: 'video/vnd.dece.hd',
1175
- uvvh: 'video/vnd.dece.hd',
1176
- uvm: 'video/vnd.dece.mobile',
1177
- uvvm: 'video/vnd.dece.mobile',
1178
- uvp: 'video/vnd.dece.pd',
1179
- uvvp: 'video/vnd.dece.pd',
1180
- uvs: 'video/vnd.dece.sd',
1181
- uvvs: 'video/vnd.dece.sd',
1182
- uvv: 'video/vnd.dece.video',
1183
- uvvv: 'video/vnd.dece.video',
1184
- dvb: 'video/vnd.dvb.file',
1185
- fvt: 'video/vnd.fvt',
1186
- mxu: 'video/vnd.mpegurl',
1187
- m4u: 'video/vnd.mpegurl',
1188
- pyv: 'video/vnd.ms-playready.media.pyv',
1189
- uvu: 'video/vnd.uvvu.mp4',
1190
- uvvu: 'video/vnd.uvvu.mp4',
1191
- viv: 'video/vnd.vivo',
1192
- webm: 'video/webm',
1193
- f4v: 'video/x-f4v',
1194
- fli: 'video/x-fli',
1195
- flv: 'video/x-flv',
1196
- m4v: 'video/x-m4v',
1197
- mkv: 'video/x-matroska',
1198
- mk3d: 'video/x-matroska',
1199
- mks: 'video/x-matroska',
1200
- mng: 'video/x-mng',
1201
- asf: 'video/x-ms-asf',
1202
- asx: 'video/x-ms-asf',
1203
- vob: 'video/x-ms-vob',
1204
- wm: 'video/x-ms-wm',
1205
- wmv: 'video/x-ms-wmv',
1206
- wmx: 'video/x-ms-wmx',
1207
- wvx: 'video/x-ms-wvx',
1208
- avi: 'video/x-msvideo',
1209
- movie: 'video/x-sgi-movie',
1210
- smv: 'video/x-smv',
1211
- ice: 'x-conference/x-cooltalk',
5
+ const extensions = {
6
+ '123': 'application/vnd.lotus-1-2-3',
7
+ ez: 'application/andrew-inset',
8
+ aw: 'application/applixware',
9
+ atom: 'application/atom+xml',
10
+ atomcat: 'application/atomcat+xml',
11
+ atomdeleted: 'application/atomdeleted+xml',
12
+ atomsvc: 'application/atomsvc+xml',
13
+ dwd: 'application/atsc-dwd+xml',
14
+ held: 'application/atsc-held+xml',
15
+ rsat: 'application/atsc-rsat+xml',
16
+ bdoc: 'application/x-bdoc',
17
+ xcs: 'application/calendar+xml',
18
+ ccxml: 'application/ccxml+xml',
19
+ cdfx: 'application/cdfx+xml',
20
+ cdmia: 'application/cdmi-capability',
21
+ cdmic: 'application/cdmi-container',
22
+ cdmid: 'application/cdmi-domain',
23
+ cdmio: 'application/cdmi-object',
24
+ cdmiq: 'application/cdmi-queue',
25
+ cpl: 'application/cpl+xml',
26
+ cu: 'application/cu-seeme',
27
+ cwl: 'application/cwl',
28
+ mpd: 'application/dash+xml',
29
+ mpp: 'application/vnd.ms-project',
30
+ davmount: 'application/davmount+xml',
31
+ dbk: 'application/docbook+xml',
32
+ dssc: 'application/dssc+der',
33
+ xdssc: 'application/dssc+xml',
34
+ ecma: 'application/ecmascript',
35
+ emma: 'application/emma+xml',
36
+ emotionml: 'application/emotionml+xml',
37
+ epub: 'application/epub+zip',
38
+ exi: 'application/exi',
39
+ exp: 'application/express',
40
+ fdf: 'application/vnd.fdf',
41
+ fdt: 'application/fdt+xml',
42
+ pfr: 'application/font-tdpfr',
43
+ geojson: 'application/geo+json',
44
+ gml: 'application/gml+xml',
45
+ gpx: 'application/gpx+xml',
46
+ gxf: 'application/gxf',
47
+ gz: 'application/gzip',
48
+ hjson: 'application/hjson',
49
+ stk: 'application/hyperstudio',
50
+ ink: 'application/inkml+xml',
51
+ inkml: 'application/inkml+xml',
52
+ ipfix: 'application/ipfix',
53
+ its: 'application/its+xml',
54
+ jar: 'application/java-archive',
55
+ war: 'application/java-archive',
56
+ ear: 'application/java-archive',
57
+ ser: 'application/java-serialized-object',
58
+ class: 'application/java-vm',
59
+ js: 'application/javascript',
60
+ mjs: 'application/javascript',
61
+ json: 'application/json',
62
+ map: 'application/json',
63
+ json5: 'application/json5',
64
+ jsonml: 'application/jsonml+json',
65
+ jsonld: 'application/ld+json',
66
+ lgr: 'application/lgr+xml',
67
+ lostxml: 'application/lost+xml',
68
+ hqx: 'application/mac-binhex40',
69
+ cpt: 'application/mac-compactpro',
70
+ mads: 'application/mads+xml',
71
+ webmanifest: 'application/manifest+json',
72
+ mrc: 'application/marc',
73
+ mrcx: 'application/marcxml+xml',
74
+ ma: 'application/mathematica',
75
+ nb: 'application/mathematica',
76
+ mb: 'application/mathematica',
77
+ mathml: 'application/mathml+xml',
78
+ mbox: 'application/mbox',
79
+ mpf: 'application/media-policy-dataset+xml',
80
+ mscml: 'application/mediaservercontrol+xml',
81
+ metalink: 'application/metalink+xml',
82
+ meta4: 'application/metalink4+xml',
83
+ mets: 'application/mets+xml',
84
+ maei: 'application/mmt-aei+xml',
85
+ musd: 'application/mmt-usd+xml',
86
+ mods: 'application/mods+xml',
87
+ m21: 'application/mp21',
88
+ mp21: 'application/mp21',
89
+ mp4s: 'application/mp4',
90
+ m4p: 'application/mp4',
91
+ doc: 'application/msword',
92
+ dot: 'application/msword',
93
+ mxf: 'application/mxf',
94
+ nq: 'application/n-quads',
95
+ nt: 'application/n-triples',
96
+ cjs: 'application/node',
97
+ bin: 'application/octet-stream',
98
+ dms: 'application/octet-stream',
99
+ lrf: 'application/octet-stream',
100
+ mar: 'application/octet-stream',
101
+ so: 'application/octet-stream',
102
+ dist: 'application/octet-stream',
103
+ distz: 'application/octet-stream',
104
+ pkg: 'application/octet-stream',
105
+ bpk: 'application/octet-stream',
106
+ dump: 'application/octet-stream',
107
+ elc: 'application/octet-stream',
108
+ deploy: 'application/octet-stream',
109
+ exe: 'application/x-msdownload',
110
+ dll: 'application/x-msdownload',
111
+ deb: 'application/x-debian-package',
112
+ dmg: 'application/x-apple-diskimage',
113
+ iso: 'application/x-iso9660-image',
114
+ img: 'application/octet-stream',
115
+ msi: 'application/x-msdownload',
116
+ msp: 'application/octet-stream',
117
+ msm: 'application/octet-stream',
118
+ buffer: 'application/octet-stream',
119
+ oda: 'application/oda',
120
+ opf: 'application/oebps-package+xml',
121
+ ogx: 'application/ogg',
122
+ omdoc: 'application/omdoc+xml',
123
+ onetoc: 'application/onenote',
124
+ onetoc2: 'application/onenote',
125
+ onetmp: 'application/onenote',
126
+ onepkg: 'application/onenote',
127
+ oxps: 'application/oxps',
128
+ relo: 'application/p2p-overlay+xml',
129
+ xer: 'application/patch-ops-error+xml',
130
+ pdf: 'application/pdf',
131
+ pgp: 'application/pgp-encrypted',
132
+ asc: 'application/pgp-signature',
133
+ sig: 'application/pgp-signature',
134
+ prf: 'application/pics-rules',
135
+ p10: 'application/pkcs10',
136
+ p7m: 'application/pkcs7-mime',
137
+ p7c: 'application/pkcs7-mime',
138
+ p7s: 'application/pkcs7-signature',
139
+ p8: 'application/pkcs8',
140
+ ac: 'application/vnd.nokia.n-gage.ac+xml',
141
+ cer: 'application/pkix-cert',
142
+ crl: 'application/pkix-crl',
143
+ pkipath: 'application/pkix-pkipath',
144
+ pki: 'application/pkixcmp',
145
+ pls: 'application/pls+xml',
146
+ ai: 'application/postscript',
147
+ eps: 'application/postscript',
148
+ ps: 'application/postscript',
149
+ provx: 'application/provenance+xml',
150
+ cww: 'application/prs.cww',
151
+ pskcxml: 'application/pskc+xml',
152
+ raml: 'application/raml+yaml',
153
+ rdf: 'application/rdf+xml',
154
+ owl: 'application/rdf+xml',
155
+ rif: 'application/reginfo+xml',
156
+ rnc: 'application/relax-ng-compact-syntax',
157
+ rl: 'application/resource-lists+xml',
158
+ rld: 'application/resource-lists-diff+xml',
159
+ rs: 'application/rls-services+xml',
160
+ rapd: 'application/route-apd+xml',
161
+ sls: 'application/route-s-tsid+xml',
162
+ rusd: 'application/route-usd+xml',
163
+ gbr: 'application/rpki-ghostbusters',
164
+ mft: 'application/rpki-manifest',
165
+ roa: 'application/rpki-roa',
166
+ rsd: 'application/rsd+xml',
167
+ rss: 'application/rss+xml',
168
+ rtf: 'text/rtf',
169
+ sbml: 'application/sbml+xml',
170
+ scq: 'application/scvp-cv-request',
171
+ scs: 'application/scvp-cv-response',
172
+ spq: 'application/scvp-vp-request',
173
+ spp: 'application/scvp-vp-response',
174
+ sdp: 'application/sdp',
175
+ senmlx: 'application/senml+xml',
176
+ sensmlx: 'application/sensml+xml',
177
+ setpay: 'application/set-payment-initiation',
178
+ setreg: 'application/set-registration-initiation',
179
+ shf: 'application/shf+xml',
180
+ siv: 'application/sieve',
181
+ sieve: 'application/sieve',
182
+ smi: 'application/smil+xml',
183
+ smil: 'application/smil+xml',
184
+ rq: 'application/sparql-query',
185
+ srx: 'application/sparql-results+xml',
186
+ gram: 'application/srgs',
187
+ grxml: 'application/srgs+xml',
188
+ sru: 'application/sru+xml',
189
+ ssdl: 'application/ssdl+xml',
190
+ ssml: 'application/ssml+xml',
191
+ swidtag: 'application/swid+xml',
192
+ tei: 'application/tei+xml',
193
+ teicorpus: 'application/tei+xml',
194
+ tfi: 'application/thraud+xml',
195
+ tsd: 'application/timestamped-data',
196
+ toml: 'application/toml',
197
+ trig: 'application/trig',
198
+ ttml: 'application/ttml+xml',
199
+ ubj: 'application/ubjson',
200
+ rsheet: 'application/urc-ressheet+xml',
201
+ td: 'application/urc-targetdesc+xml',
202
+ '1km': 'application/vnd.1000minds.decision-model+xml',
203
+ plb: 'application/vnd.3gpp.pic-bw-large',
204
+ psb: 'application/vnd.3gpp.pic-bw-small',
205
+ pvb: 'application/vnd.3gpp.pic-bw-var',
206
+ tcap: 'application/vnd.3gpp2.tcap',
207
+ pwn: 'application/vnd.3m.post-it-notes',
208
+ aso: 'application/vnd.accpac.simply.aso',
209
+ imp: 'application/vnd.accpac.simply.imp',
210
+ acu: 'application/vnd.acucobol',
211
+ atc: 'application/vnd.acucorp',
212
+ acutc: 'application/vnd.acucorp',
213
+ air: 'application/vnd.adobe.air-application-installer-package+zip',
214
+ fcdt: 'application/vnd.adobe.formscentral.fcdt',
215
+ fxp: 'application/vnd.adobe.fxp',
216
+ fxpl: 'application/vnd.adobe.fxp',
217
+ xdp: 'application/vnd.adobe.xdp+xml',
218
+ xfdf: 'application/xfdf',
219
+ age: 'application/vnd.age',
220
+ ahead: 'application/vnd.ahead.space',
221
+ azf: 'application/vnd.airzip.filesecure.azf',
222
+ azs: 'application/vnd.airzip.filesecure.azs',
223
+ azw: 'application/vnd.amazon.ebook',
224
+ acc: 'application/vnd.americandynamics.acc',
225
+ ami: 'application/vnd.amiga.ami',
226
+ apk: 'application/vnd.android.package-archive',
227
+ cii: 'application/vnd.anser-web-certificate-issue-initiation',
228
+ fti: 'application/vnd.anser-web-funds-transfer-initiation',
229
+ atx: 'application/vnd.antix.game-component',
230
+ mpkg: 'application/vnd.apple.installer+xml',
231
+ key: 'application/x-iwork-keynote-sffkey',
232
+ m3u8: 'application/vnd.apple.mpegurl',
233
+ numbers: 'application/x-iwork-numbers-sffnumbers',
234
+ pages: 'application/x-iwork-pages-sffpages',
235
+ pkpass: 'application/vnd.apple.pkpass',
236
+ swi: 'application/vnd.aristanetworks.swi',
237
+ iota: 'application/vnd.astraea-software.iota',
238
+ aep: 'application/vnd.audiograph',
239
+ bmml: 'application/vnd.balsamiq.bmml+xml',
240
+ mpm: 'application/vnd.blueice.multipass',
241
+ bmi: 'application/vnd.bmi',
242
+ rep: 'application/vnd.businessobjects',
243
+ cdxml: 'application/vnd.chemdraw+xml',
244
+ mmd: 'application/vnd.chipnuts.karaoke-mmd',
245
+ cdy: 'application/vnd.cinderella',
246
+ csl: 'application/vnd.citationstyles.style+xml',
247
+ cla: 'application/vnd.claymore',
248
+ rp9: 'application/vnd.cloanto.rp9',
249
+ c4g: 'application/vnd.clonk.c4group',
250
+ c4d: 'application/vnd.clonk.c4group',
251
+ c4f: 'application/vnd.clonk.c4group',
252
+ c4p: 'application/vnd.clonk.c4group',
253
+ c4u: 'application/vnd.clonk.c4group',
254
+ c11amc: 'application/vnd.cluetrust.cartomobile-config',
255
+ c11amz: 'application/vnd.cluetrust.cartomobile-config-pkg',
256
+ csp: 'application/vnd.commonspace',
257
+ cdbcmsg: 'application/vnd.contact.cmsg',
258
+ cmc: 'application/vnd.cosmocaller',
259
+ clkx: 'application/vnd.crick.clicker',
260
+ clkk: 'application/vnd.crick.clicker.keyboard',
261
+ clkp: 'application/vnd.crick.clicker.palette',
262
+ clkt: 'application/vnd.crick.clicker.template',
263
+ clkw: 'application/vnd.crick.clicker.wordbank',
264
+ wbs: 'application/vnd.criticaltools.wbs+xml',
265
+ pml: 'application/vnd.ctc-posml',
266
+ ppd: 'application/vnd.cups-ppd',
267
+ car: 'application/vnd.curl.car',
268
+ pcurl: 'application/vnd.curl.pcurl',
269
+ dart: 'application/vnd.dart',
270
+ rdz: 'application/vnd.data-vision.rdz',
271
+ dbf: 'application/vnd.dbf',
272
+ uvf: 'application/vnd.dece.data',
273
+ uvvf: 'application/vnd.dece.data',
274
+ uvd: 'application/vnd.dece.data',
275
+ uvvd: 'application/vnd.dece.data',
276
+ uvt: 'application/vnd.dece.ttml+xml',
277
+ uvvt: 'application/vnd.dece.ttml+xml',
278
+ uvx: 'application/vnd.dece.unspecified',
279
+ uvvx: 'application/vnd.dece.unspecified',
280
+ uvz: 'application/vnd.dece.zip',
281
+ uvvz: 'application/vnd.dece.zip',
282
+ fe_launch: 'application/vnd.denovo.fcselayout-link',
283
+ dna: 'application/vnd.dna',
284
+ mlp: 'application/vnd.dolby.mlp',
285
+ dpg: 'application/vnd.dpgraph',
286
+ dfac: 'application/vnd.dreamfactory',
287
+ kpxx: 'application/vnd.ds-keypoint',
288
+ ait: 'application/vnd.dvb.ait',
289
+ svc: 'application/vnd.dvb.service',
290
+ geo: 'application/vnd.dynageo',
291
+ mag: 'application/vnd.ecowin.chart',
292
+ nml: 'application/vnd.enliven',
293
+ esf: 'application/vnd.epson.esf',
294
+ msf: 'application/vnd.epson.msf',
295
+ qam: 'application/vnd.epson.quickanime',
296
+ slt: 'application/vnd.epson.salt',
297
+ ssf: 'application/vnd.epson.ssf',
298
+ es3: 'application/vnd.eszigno3+xml',
299
+ et3: 'application/vnd.eszigno3+xml',
300
+ ez2: 'application/vnd.ezpix-album',
301
+ ez3: 'application/vnd.ezpix-package',
302
+ mseed: 'application/vnd.fdsn.mseed',
303
+ seed: 'application/vnd.fdsn.seed',
304
+ dataless: 'application/vnd.fdsn.seed',
305
+ gph: 'application/vnd.flographit',
306
+ ftc: 'application/vnd.fluxtime.clip',
307
+ fm: 'application/vnd.framemaker',
308
+ frame: 'application/vnd.framemaker',
309
+ maker: 'application/vnd.framemaker',
310
+ book: 'application/vnd.framemaker',
311
+ fnc: 'application/vnd.frogans.fnc',
312
+ ltf: 'application/vnd.frogans.ltf',
313
+ fsc: 'application/vnd.fsc.weblaunch',
314
+ oas: 'application/vnd.fujitsu.oasys',
315
+ oa2: 'application/vnd.fujitsu.oasys2',
316
+ oa3: 'application/vnd.fujitsu.oasys3',
317
+ fg5: 'application/vnd.fujitsu.oasysgp',
318
+ bh2: 'application/vnd.fujitsu.oasysprs',
319
+ ddd: 'application/vnd.fujixerox.ddd',
320
+ xdw: 'application/vnd.fujixerox.docuworks',
321
+ xbd: 'application/vnd.fujixerox.docuworks.binder',
322
+ fzs: 'application/vnd.fuzzysheet',
323
+ txd: 'application/vnd.genomatix.tuxedo',
324
+ ggb: 'application/vnd.geogebra.file',
325
+ ggt: 'application/vnd.geogebra.tool',
326
+ gex: 'application/vnd.geometry-explorer',
327
+ gre: 'application/vnd.geometry-explorer',
328
+ gxt: 'application/vnd.geonext',
329
+ g2w: 'application/vnd.geoplan',
330
+ g3w: 'application/vnd.geospace',
331
+ gmx: 'application/vnd.gmx',
332
+ gdoc: 'application/vnd.google-apps.document',
333
+ gslides: 'application/vnd.google-apps.presentation',
334
+ gsheet: 'application/vnd.google-apps.spreadsheet',
335
+ kml: 'application/vnd.google-earth.kml+xml',
336
+ kmz: 'application/vnd.google-earth.kmz',
337
+ gqf: 'application/vnd.grafeq',
338
+ gqs: 'application/vnd.grafeq',
339
+ gac: 'application/vnd.groove-account',
340
+ ghf: 'application/vnd.groove-help',
341
+ gim: 'application/vnd.groove-identity-message',
342
+ grv: 'application/vnd.groove-injector',
343
+ gtm: 'application/vnd.groove-tool-message',
344
+ tpl: 'application/vnd.groove-tool-template',
345
+ vcg: 'application/vnd.groove-vcard',
346
+ hal: 'application/vnd.hal+xml',
347
+ zmm: 'application/vnd.handheld-entertainment+xml',
348
+ hbci: 'application/vnd.hbci',
349
+ les: 'application/vnd.hhe.lesson-player',
350
+ hpgl: 'application/vnd.hp-hpgl',
351
+ hpid: 'application/vnd.hp-hpid',
352
+ hps: 'application/vnd.hp-hps',
353
+ jlt: 'application/vnd.hp-jlyt',
354
+ pcl: 'application/vnd.hp-pcl',
355
+ pclxl: 'application/vnd.hp-pclxl',
356
+ 'sfd-hdstx': 'application/vnd.hydrostatix.sof-data',
357
+ mpy: 'application/vnd.ibm.minipay',
358
+ afp: 'application/vnd.ibm.modcap',
359
+ listafp: 'application/vnd.ibm.modcap',
360
+ list3820: 'application/vnd.ibm.modcap',
361
+ irm: 'application/vnd.ibm.rights-management',
362
+ sc: 'application/vnd.ibm.secure-container',
363
+ icc: 'application/vnd.iccprofile',
364
+ icm: 'application/vnd.iccprofile',
365
+ igl: 'application/vnd.igloader',
366
+ ivp: 'application/vnd.immervision-ivp',
367
+ ivu: 'application/vnd.immervision-ivu',
368
+ igm: 'application/vnd.insors.igm',
369
+ xpw: 'application/vnd.intercon.formnet',
370
+ xpx: 'application/vnd.intercon.formnet',
371
+ i2g: 'application/vnd.intergeo',
372
+ qbo: 'application/vnd.intu.qbo',
373
+ qfx: 'application/vnd.intu.qfx',
374
+ rcprofile: 'application/vnd.ipunplugged.rcprofile',
375
+ irp: 'application/vnd.irepository.package+xml',
376
+ xpr: 'application/vnd.is-xpr',
377
+ fcs: 'application/vnd.isac.fcs',
378
+ jam: 'application/vnd.jam',
379
+ rms: 'application/vnd.jcp.javame.midlet-rms',
380
+ jisp: 'application/vnd.jisp',
381
+ joda: 'application/vnd.joost.joda-archive',
382
+ ktz: 'application/vnd.kahootz',
383
+ ktr: 'application/vnd.kahootz',
384
+ karbon: 'application/vnd.kde.karbon',
385
+ chrt: 'application/vnd.kde.kchart',
386
+ kfo: 'application/vnd.kde.kformula',
387
+ flw: 'application/vnd.kde.kivio',
388
+ kon: 'application/vnd.kde.kontour',
389
+ kpr: 'application/vnd.kde.kpresenter',
390
+ kpt: 'application/vnd.kde.kpresenter',
391
+ ksp: 'application/vnd.kde.kspread',
392
+ kwd: 'application/vnd.kde.kword',
393
+ kwt: 'application/vnd.kde.kword',
394
+ htke: 'application/vnd.kenameaapp',
395
+ kia: 'application/vnd.kidspiration',
396
+ kne: 'application/vnd.kinar',
397
+ knp: 'application/vnd.kinar',
398
+ skp: 'application/vnd.koan',
399
+ skd: 'application/vnd.koan',
400
+ skt: 'application/vnd.koan',
401
+ skm: 'application/vnd.koan',
402
+ sse: 'application/vnd.kodak-descriptor',
403
+ lasxml: 'application/vnd.las.las+xml',
404
+ lbd: 'application/vnd.llamagraphics.life-balance.desktop',
405
+ lbe: 'application/vnd.llamagraphics.life-balance.exchange+xml',
406
+ apr: 'application/vnd.lotus-approach',
407
+ pre: 'application/vnd.lotus-freelance',
408
+ nsf: 'application/vnd.lotus-notes',
409
+ org: 'text/x-org',
410
+ scm: 'application/vnd.lotus-screencam',
411
+ lwp: 'application/vnd.lotus-wordpro',
412
+ portpkg: 'application/vnd.macports.portpkg',
413
+ mvt: 'application/vnd.mapbox-vector-tile',
414
+ mcd: 'application/vnd.mcd',
415
+ mc1: 'application/vnd.medcalcdata',
416
+ cdkey: 'application/vnd.mediastation.cdkey',
417
+ mwf: 'application/vnd.mfer',
418
+ mfm: 'application/vnd.mfmp',
419
+ flo: 'application/vnd.micrografx.flo',
420
+ igx: 'application/vnd.micrografx.igx',
421
+ mif: 'application/vnd.mif',
422
+ daf: 'application/vnd.mobius.daf',
423
+ dis: 'application/vnd.mobius.dis',
424
+ mbk: 'application/vnd.mobius.mbk',
425
+ mqy: 'application/vnd.mobius.mqy',
426
+ msl: 'application/vnd.mobius.msl',
427
+ plc: 'application/vnd.mobius.plc',
428
+ txf: 'application/vnd.mobius.txf',
429
+ mpn: 'application/vnd.mophun.application',
430
+ mpc: 'application/vnd.mophun.certificate',
431
+ xul: 'application/vnd.mozilla.xul+xml',
432
+ cil: 'application/vnd.ms-artgalry',
433
+ cab: 'application/vnd.ms-cab-compressed',
434
+ xls: 'application/vnd.ms-excel',
435
+ xlm: 'application/vnd.ms-excel',
436
+ xla: 'application/vnd.ms-excel',
437
+ xlc: 'application/vnd.ms-excel',
438
+ xlt: 'application/vnd.ms-excel',
439
+ xlw: 'application/vnd.ms-excel',
440
+ xlam: 'application/vnd.ms-excel.addin.macroenabled.12',
441
+ xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
442
+ xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',
443
+ xltm: 'application/vnd.ms-excel.template.macroenabled.12',
444
+ eot: 'application/vnd.ms-fontobject',
445
+ chm: 'application/vnd.ms-htmlhelp',
446
+ ims: 'application/vnd.ms-ims',
447
+ lrm: 'application/vnd.ms-lrm',
448
+ thmx: 'application/vnd.ms-officetheme',
449
+ msg: 'application/vnd.ms-outlook',
450
+ cat: 'application/vnd.ms-pki.seccat',
451
+ stl: 'model/stl',
452
+ ppt: 'application/vnd.ms-powerpoint',
453
+ pps: 'application/vnd.ms-powerpoint',
454
+ pot: 'application/vnd.ms-powerpoint',
455
+ ppam: 'application/vnd.ms-powerpoint.addin.macroenabled.12',
456
+ pptm: 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
457
+ sldm: 'application/vnd.ms-powerpoint.slide.macroenabled.12',
458
+ ppsm: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
459
+ potm: 'application/vnd.ms-powerpoint.template.macroenabled.12',
460
+ mpt: 'application/vnd.ms-project',
461
+ docm: 'application/vnd.ms-word.document.macroenabled.12',
462
+ dotm: 'application/vnd.ms-word.template.macroenabled.12',
463
+ wps: 'application/vnd.ms-works',
464
+ wks: 'application/vnd.ms-works',
465
+ wcm: 'application/vnd.ms-works',
466
+ wdb: 'application/vnd.ms-works',
467
+ wpl: 'application/vnd.ms-wpl',
468
+ xps: 'application/vnd.ms-xpsdocument',
469
+ mseq: 'application/vnd.mseq',
470
+ mus: 'application/vnd.musician',
471
+ msty: 'application/vnd.muvee.style',
472
+ taglet: 'application/vnd.mynfc',
473
+ nlu: 'application/vnd.neurolanguage.nlu',
474
+ ntf: 'application/vnd.nitf',
475
+ nitf: 'application/vnd.nitf',
476
+ nnd: 'application/vnd.noblenet-directory',
477
+ nns: 'application/vnd.noblenet-sealer',
478
+ nnw: 'application/vnd.noblenet-web',
479
+ ngdat: 'application/vnd.nokia.n-gage.data',
480
+ 'n-gage': 'application/vnd.nokia.n-gage.symbian.install',
481
+ rpst: 'application/vnd.nokia.radio-preset',
482
+ rpss: 'application/vnd.nokia.radio-presets',
483
+ edm: 'application/vnd.novadigm.edm',
484
+ edx: 'application/vnd.novadigm.edx',
485
+ ext: 'application/vnd.novadigm.ext',
486
+ odc: 'application/vnd.oasis.opendocument.chart',
487
+ otc: 'application/vnd.oasis.opendocument.chart-template',
488
+ odb: 'application/vnd.oasis.opendocument.database',
489
+ odf: 'application/vnd.oasis.opendocument.formula',
490
+ odft: 'application/vnd.oasis.opendocument.formula-template',
491
+ odg: 'application/vnd.oasis.opendocument.graphics',
492
+ otg: 'application/vnd.oasis.opendocument.graphics-template',
493
+ odi: 'application/vnd.oasis.opendocument.image',
494
+ oti: 'application/vnd.oasis.opendocument.image-template',
495
+ odp: 'application/vnd.oasis.opendocument.presentation',
496
+ otp: 'application/vnd.oasis.opendocument.presentation-template',
497
+ ods: 'application/vnd.oasis.opendocument.spreadsheet',
498
+ ots: 'application/vnd.oasis.opendocument.spreadsheet-template',
499
+ odt: 'application/vnd.oasis.opendocument.text',
500
+ odm: 'application/vnd.oasis.opendocument.text-master',
501
+ ott: 'application/vnd.oasis.opendocument.text-template',
502
+ oth: 'application/vnd.oasis.opendocument.text-web',
503
+ xo: 'application/vnd.olpc-sugar',
504
+ dd2: 'application/vnd.oma.dd2+xml',
505
+ obgx: 'application/vnd.openblox.game+xml',
506
+ oxt: 'application/vnd.openofficeorg.extension',
507
+ osm: 'application/vnd.openstreetmap.data+xml',
508
+ pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
509
+ sldx: 'application/vnd.openxmlformats-officedocument.presentationml.slide',
510
+ ppsx: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
511
+ potx: 'application/vnd.openxmlformats-officedocument.presentationml.template',
512
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
513
+ xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
514
+ docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
515
+ dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
516
+ mgp: 'application/vnd.osgeo.mapguide.package',
517
+ dp: 'application/vnd.osgi.dp',
518
+ esa: 'application/vnd.osgi.subsystem',
519
+ pdb: 'application/x-pilot',
520
+ pqa: 'application/vnd.palm',
521
+ oprc: 'application/vnd.palm',
522
+ paw: 'application/vnd.pawaafile',
523
+ str: 'application/vnd.pg.format',
524
+ ei6: 'application/vnd.pg.osasli',
525
+ efif: 'application/vnd.picsel',
526
+ wg: 'application/vnd.pmi.widget',
527
+ plf: 'application/vnd.pocketlearn',
528
+ pbd: 'application/vnd.powerbuilder6',
529
+ box: 'application/vnd.previewsystems.box',
530
+ mgz: 'application/vnd.proteus.magazine',
531
+ qps: 'application/vnd.publishare-delta-tree',
532
+ ptid: 'application/vnd.pvi.ptid1',
533
+ qxd: 'application/vnd.quark.quarkxpress',
534
+ qxt: 'application/vnd.quark.quarkxpress',
535
+ qwd: 'application/vnd.quark.quarkxpress',
536
+ qwt: 'application/vnd.quark.quarkxpress',
537
+ qxl: 'application/vnd.quark.quarkxpress',
538
+ qxb: 'application/vnd.quark.quarkxpress',
539
+ rar: 'application/x-rar-compressed',
540
+ bed: 'application/vnd.realvnc.bed',
541
+ mxl: 'application/vnd.recordare.musicxml',
542
+ musicxml: 'application/vnd.recordare.musicxml+xml',
543
+ cryptonote: 'application/vnd.rig.cryptonote',
544
+ cod: 'application/vnd.rim.cod',
545
+ rm: 'application/vnd.rn-realmedia',
546
+ rmvb: 'application/vnd.rn-realmedia-vbr',
547
+ link66: 'application/vnd.route66.link66+xml',
548
+ st: 'application/vnd.sailingtracker.track',
549
+ see: 'application/vnd.seemail',
550
+ sema: 'application/vnd.sema',
551
+ semd: 'application/vnd.semd',
552
+ semf: 'application/vnd.semf',
553
+ ifm: 'application/vnd.shana.informed.formdata',
554
+ itp: 'application/vnd.shana.informed.formtemplate',
555
+ iif: 'application/vnd.shana.informed.interchange',
556
+ ipk: 'application/vnd.shana.informed.package',
557
+ twd: 'application/vnd.simtech-mindmapper',
558
+ twds: 'application/vnd.simtech-mindmapper',
559
+ mmf: 'application/vnd.smaf',
560
+ teacher: 'application/vnd.smart.teacher',
561
+ fo: 'application/vnd.software602.filler.form+xml',
562
+ sdkm: 'application/vnd.solent.sdkm+xml',
563
+ sdkd: 'application/vnd.solent.sdkm+xml',
564
+ dxp: 'application/vnd.spotfire.dxp',
565
+ sfs: 'application/vnd.spotfire.sfs',
566
+ sdc: 'application/vnd.stardivision.calc',
567
+ sda: 'application/vnd.stardivision.draw',
568
+ sdd: 'application/vnd.stardivision.impress',
569
+ smf: 'application/vnd.stardivision.math',
570
+ sdw: 'application/vnd.stardivision.writer',
571
+ vor: 'application/vnd.stardivision.writer',
572
+ sgl: 'application/vnd.stardivision.writer-global',
573
+ smzip: 'application/vnd.stepmania.package',
574
+ sm: 'application/vnd.stepmania.stepchart',
575
+ wadl: 'application/vnd.sun.wadl+xml',
576
+ sxc: 'application/vnd.sun.xml.calc',
577
+ stc: 'application/vnd.sun.xml.calc.template',
578
+ sxd: 'application/vnd.sun.xml.draw',
579
+ std: 'application/vnd.sun.xml.draw.template',
580
+ sxi: 'application/vnd.sun.xml.impress',
581
+ sti: 'application/vnd.sun.xml.impress.template',
582
+ sxm: 'application/vnd.sun.xml.math',
583
+ sxw: 'application/vnd.sun.xml.writer',
584
+ sxg: 'application/vnd.sun.xml.writer.global',
585
+ stw: 'application/vnd.sun.xml.writer.template',
586
+ sus: 'application/vnd.sus-calendar',
587
+ susp: 'application/vnd.sus-calendar',
588
+ svd: 'application/vnd.svd',
589
+ sis: 'application/vnd.symbian.install',
590
+ sisx: 'application/vnd.symbian.install',
591
+ xsm: 'application/vnd.syncml+xml',
592
+ bdm: 'application/vnd.syncml.dm+wbxml',
593
+ xdm: 'application/vnd.syncml.dm+xml',
594
+ ddf: 'application/vnd.syncml.dmddf+xml',
595
+ tao: 'application/vnd.tao.intent-module-archive',
596
+ pcap: 'application/vnd.tcpdump.pcap',
597
+ cap: 'application/vnd.tcpdump.pcap',
598
+ dmp: 'application/vnd.tcpdump.pcap',
599
+ tmo: 'application/vnd.tmobile-livetv',
600
+ tpt: 'application/vnd.trid.tpt',
601
+ mxs: 'application/vnd.triscape.mxs',
602
+ tra: 'application/vnd.trueapp',
603
+ ufd: 'application/vnd.ufdl',
604
+ ufdl: 'application/vnd.ufdl',
605
+ utz: 'application/vnd.uiq.theme',
606
+ umj: 'application/vnd.umajin',
607
+ unityweb: 'application/vnd.unity',
608
+ uoml: 'application/vnd.uoml+xml',
609
+ vcx: 'application/vnd.vcx',
610
+ vsd: 'application/vnd.visio',
611
+ vst: 'application/vnd.visio',
612
+ vss: 'application/vnd.visio',
613
+ vsw: 'application/vnd.visio',
614
+ vis: 'application/vnd.visionary',
615
+ vsf: 'application/vnd.vsf',
616
+ wbxml: 'application/vnd.wap.wbxml',
617
+ wmlc: 'application/vnd.wap.wmlc',
618
+ wmlsc: 'application/vnd.wap.wmlscriptc',
619
+ wtb: 'application/vnd.webturbo',
620
+ nbp: 'application/vnd.wolfram.player',
621
+ wpd: 'application/vnd.wordperfect',
622
+ wqd: 'application/vnd.wqd',
623
+ stf: 'application/vnd.wt.stf',
624
+ xar: 'application/vnd.xara',
625
+ xfdl: 'application/vnd.xfdl',
626
+ hvd: 'application/vnd.yamaha.hv-dic',
627
+ hvs: 'application/vnd.yamaha.hv-script',
628
+ hvp: 'application/vnd.yamaha.hv-voice',
629
+ osf: 'application/vnd.yamaha.openscoreformat',
630
+ osfpvg: 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
631
+ saf: 'application/vnd.yamaha.smaf-audio',
632
+ spf: 'application/vnd.yamaha.smaf-phrase',
633
+ cmp: 'application/vnd.yellowriver-custom-menu',
634
+ zir: 'application/vnd.zul',
635
+ zirz: 'application/vnd.zul',
636
+ zaz: 'application/vnd.zzazz.deck+xml',
637
+ vxml: 'application/voicexml+xml',
638
+ wasm: 'application/wasm',
639
+ wif: 'application/watcherinfo+xml',
640
+ wgt: 'application/widget',
641
+ hlp: 'application/winhlp',
642
+ wsdl: 'application/wsdl+xml',
643
+ wspolicy: 'application/wspolicy+xml',
644
+ '7z': 'application/x-7z-compressed',
645
+ abw: 'application/x-abiword',
646
+ ace: 'application/x-ace-compressed',
647
+ arj: 'application/x-arj',
648
+ aab: 'application/x-authorware-bin',
649
+ x32: 'application/x-authorware-bin',
650
+ u32: 'application/x-authorware-bin',
651
+ vox: 'application/x-authorware-bin',
652
+ aam: 'application/x-authorware-map',
653
+ aas: 'application/x-authorware-seg',
654
+ bcpio: 'application/x-bcpio',
655
+ torrent: 'application/x-bittorrent',
656
+ blb: 'application/x-blorb',
657
+ blorb: 'application/x-blorb',
658
+ bz: 'application/x-bzip',
659
+ bz2: 'application/x-bzip2',
660
+ boz: 'application/x-bzip2',
661
+ cbr: 'application/x-cbr',
662
+ cba: 'application/x-cbr',
663
+ cbt: 'application/x-cbr',
664
+ cbz: 'application/x-cbr',
665
+ cb7: 'application/x-cbr',
666
+ vcd: 'application/x-cdlink',
667
+ cfs: 'application/x-cfs-compressed',
668
+ chat: 'application/x-chat',
669
+ pgn: 'application/x-chess-pgn',
670
+ crx: 'application/x-chrome-extension',
671
+ cco: 'application/x-cocoa',
672
+ nsc: 'application/x-conference',
673
+ cpio: 'application/x-cpio',
674
+ csh: 'application/x-csh',
675
+ udeb: 'application/x-debian-package',
676
+ dgc: 'application/x-dgc-compressed',
677
+ dir: 'application/x-director',
678
+ dcr: 'application/x-director',
679
+ dxr: 'application/x-director',
680
+ cst: 'application/x-director',
681
+ cct: 'application/x-director',
682
+ cxt: 'application/x-director',
683
+ w3d: 'application/x-director',
684
+ fgd: 'application/x-director',
685
+ swa: 'application/x-director',
686
+ wad: 'application/x-doom',
687
+ ncx: 'application/x-dtbncx+xml',
688
+ dtb: 'application/x-dtbook+xml',
689
+ res: 'application/x-dtbresource+xml',
690
+ dvi: 'application/x-dvi',
691
+ evy: 'application/x-envoy',
692
+ eva: 'application/x-eva',
693
+ bdf: 'application/x-font-bdf',
694
+ gsf: 'application/x-font-ghostscript',
695
+ psf: 'application/x-font-linux-psf',
696
+ pcf: 'application/x-font-pcf',
697
+ snf: 'application/x-font-snf',
698
+ pfa: 'application/x-font-type1',
699
+ pfb: 'application/x-font-type1',
700
+ pfm: 'application/x-font-type1',
701
+ afm: 'application/x-font-type1',
702
+ arc: 'application/x-freearc',
703
+ spl: 'application/x-futuresplash',
704
+ gca: 'application/x-gca-compressed',
705
+ ulx: 'application/x-glulx',
706
+ gnumeric: 'application/x-gnumeric',
707
+ gramps: 'application/x-gramps-xml',
708
+ gtar: 'application/x-gtar',
709
+ hdf: 'application/x-hdf',
710
+ php: 'application/x-httpd-php',
711
+ install: 'application/x-install-instructions',
712
+ jardiff: 'application/x-java-archive-diff',
713
+ jnlp: 'application/x-java-jnlp-file',
714
+ kdbx: 'application/x-keepass2',
715
+ latex: 'application/x-latex',
716
+ luac: 'application/x-lua-bytecode',
717
+ lzh: 'application/x-lzh-compressed',
718
+ lha: 'application/x-lzh-compressed',
719
+ run: 'application/x-makeself',
720
+ mie: 'application/x-mie',
721
+ prc: 'model/prc',
722
+ mobi: 'application/x-mobipocket-ebook',
723
+ application: 'application/x-ms-application',
724
+ lnk: 'application/x-ms-shortcut',
725
+ wmd: 'application/x-ms-wmd',
726
+ wmz: 'application/x-msmetafile',
727
+ xbap: 'application/x-ms-xbap',
728
+ mdb: 'application/x-msaccess',
729
+ obd: 'application/x-msbinder',
730
+ crd: 'application/x-mscardfile',
731
+ clp: 'application/x-msclip',
732
+ com: 'application/x-msdownload',
733
+ bat: 'application/x-msdownload',
734
+ mvb: 'application/x-msmediaview',
735
+ m13: 'application/x-msmediaview',
736
+ m14: 'application/x-msmediaview',
737
+ wmf: 'image/wmf',
738
+ emf: 'image/emf',
739
+ emz: 'application/x-msmetafile',
740
+ mny: 'application/x-msmoney',
741
+ pub: 'application/x-mspublisher',
742
+ scd: 'application/x-msschedule',
743
+ trm: 'application/x-msterminal',
744
+ wri: 'application/x-mswrite',
745
+ nc: 'application/x-netcdf',
746
+ cdf: 'application/x-netcdf',
747
+ pac: 'application/x-ns-proxy-autoconfig',
748
+ nzb: 'application/x-nzb',
749
+ pl: 'application/x-perl',
750
+ pm: 'application/x-perl',
751
+ p12: 'application/x-pkcs12',
752
+ pfx: 'application/x-pkcs12',
753
+ p7b: 'application/x-pkcs7-certificates',
754
+ spc: 'application/x-pkcs7-certificates',
755
+ p7r: 'application/x-pkcs7-certreqresp',
756
+ rpm: 'application/x-redhat-package-manager',
757
+ ris: 'application/x-research-info-systems',
758
+ sea: 'application/x-sea',
759
+ sh: 'application/x-sh',
760
+ shar: 'application/x-shar',
761
+ swf: 'application/x-shockwave-flash',
762
+ xap: 'application/x-silverlight-app',
763
+ sql: 'application/x-sql',
764
+ sit: 'application/x-stuffit',
765
+ sitx: 'application/x-stuffitx',
766
+ srt: 'application/x-subrip',
767
+ sv4cpio: 'application/x-sv4cpio',
768
+ sv4crc: 'application/x-sv4crc',
769
+ t3: 'application/x-t3vm-image',
770
+ gam: 'application/x-tads',
771
+ tar: 'application/x-tar',
772
+ tcl: 'application/x-tcl',
773
+ tk: 'application/x-tcl',
774
+ tex: 'application/x-tex',
775
+ tfm: 'application/x-tex-tfm',
776
+ texinfo: 'application/x-texinfo',
777
+ texi: 'application/x-texinfo',
778
+ obj: 'model/obj',
779
+ ustar: 'application/x-ustar',
780
+ hdd: 'application/x-virtualbox-hdd',
781
+ ova: 'application/x-virtualbox-ova',
782
+ ovf: 'application/x-virtualbox-ovf',
783
+ vbox: 'application/x-virtualbox-vbox',
784
+ 'vbox-extpack': 'application/x-virtualbox-vbox-extpack',
785
+ vdi: 'application/x-virtualbox-vdi',
786
+ vhd: 'application/x-virtualbox-vhd',
787
+ vmdk: 'application/x-virtualbox-vmdk',
788
+ src: 'application/x-wais-source',
789
+ webapp: 'application/x-web-app-manifest+json',
790
+ der: 'application/x-x509-ca-cert',
791
+ crt: 'application/x-x509-ca-cert',
792
+ pem: 'application/x-x509-ca-cert',
793
+ fig: 'application/x-xfig',
794
+ xlf: 'application/xliff+xml',
795
+ xpi: 'application/x-xpinstall',
796
+ xz: 'application/x-xz',
797
+ z1: 'application/x-zmachine',
798
+ z2: 'application/x-zmachine',
799
+ z3: 'application/x-zmachine',
800
+ z4: 'application/x-zmachine',
801
+ z5: 'application/x-zmachine',
802
+ z6: 'application/x-zmachine',
803
+ z7: 'application/x-zmachine',
804
+ z8: 'application/x-zmachine',
805
+ xaml: 'application/xaml+xml',
806
+ xav: 'application/xcap-att+xml',
807
+ xca: 'application/xcap-caps+xml',
808
+ xdf: 'application/xcap-diff+xml',
809
+ xel: 'application/xcap-el+xml',
810
+ xns: 'application/xcap-ns+xml',
811
+ xenc: 'application/xenc+xml',
812
+ xhtml: 'application/xhtml+xml',
813
+ xht: 'application/xhtml+xml',
814
+ xml: 'text/xml',
815
+ xsl: 'application/xslt+xml',
816
+ xsd: 'application/xml',
817
+ rng: 'application/xml',
818
+ dtd: 'application/xml-dtd',
819
+ xop: 'application/xop+xml',
820
+ xpl: 'application/xproc+xml',
821
+ xslt: 'application/xslt+xml',
822
+ xspf: 'application/xspf+xml',
823
+ mxml: 'application/xv+xml',
824
+ xhvml: 'application/xv+xml',
825
+ xvml: 'application/xv+xml',
826
+ xvm: 'application/xv+xml',
827
+ yang: 'application/yang',
828
+ yin: 'application/yin+xml',
829
+ zip: 'application/zip',
830
+ '3gpp': 'video/3gpp',
831
+ adp: 'audio/adpcm',
832
+ amr: 'audio/amr',
833
+ au: 'audio/basic',
834
+ snd: 'audio/basic',
835
+ mid: 'audio/midi',
836
+ midi: 'audio/midi',
837
+ kar: 'audio/midi',
838
+ rmi: 'audio/midi',
839
+ mxmf: 'audio/mobile-xmf',
840
+ mp3: 'audio/mpeg',
841
+ m4a: 'audio/x-m4a',
842
+ mp4a: 'audio/mp4',
843
+ mpga: 'audio/mpeg',
844
+ mp2: 'audio/mpeg',
845
+ mp2a: 'audio/mpeg',
846
+ m2a: 'audio/mpeg',
847
+ m3a: 'audio/mpeg',
848
+ oga: 'audio/ogg',
849
+ ogg: 'audio/ogg',
850
+ spx: 'audio/ogg',
851
+ opus: 'audio/ogg',
852
+ s3m: 'audio/s3m',
853
+ sil: 'audio/silk',
854
+ uva: 'audio/vnd.dece.audio',
855
+ uvva: 'audio/vnd.dece.audio',
856
+ eol: 'audio/vnd.digital-winds',
857
+ dra: 'audio/vnd.dra',
858
+ dts: 'audio/vnd.dts',
859
+ dtshd: 'audio/vnd.dts.hd',
860
+ lvp: 'audio/vnd.lucent.voice',
861
+ pya: 'audio/vnd.ms-playready.media.pya',
862
+ ecelp4800: 'audio/vnd.nuera.ecelp4800',
863
+ ecelp7470: 'audio/vnd.nuera.ecelp7470',
864
+ ecelp9600: 'audio/vnd.nuera.ecelp9600',
865
+ rip: 'audio/vnd.rip',
866
+ wav: 'audio/x-wav',
867
+ weba: 'audio/webm',
868
+ aac: 'audio/x-aac',
869
+ aif: 'audio/x-aiff',
870
+ aiff: 'audio/x-aiff',
871
+ aifc: 'audio/x-aiff',
872
+ caf: 'audio/x-caf',
873
+ flac: 'audio/x-flac',
874
+ mka: 'audio/x-matroska',
875
+ m3u: 'audio/x-mpegurl',
876
+ wax: 'audio/x-ms-wax',
877
+ wma: 'audio/x-ms-wma',
878
+ ram: 'audio/x-pn-realaudio',
879
+ ra: 'audio/x-realaudio',
880
+ rmp: 'audio/x-pn-realaudio-plugin',
881
+ xm: 'audio/xm',
882
+ cdx: 'chemical/x-cdx',
883
+ cif: 'chemical/x-cif',
884
+ cmdf: 'chemical/x-cmdf',
885
+ cml: 'chemical/x-cml',
886
+ csml: 'chemical/x-csml',
887
+ xyz: 'chemical/x-xyz',
888
+ ttc: 'font/collection',
889
+ otf: 'font/otf',
890
+ ttf: 'font/ttf',
891
+ woff: 'font/woff',
892
+ woff2: 'font/woff2',
893
+ exr: 'image/aces',
894
+ apng: 'image/apng',
895
+ avci: 'image/avci',
896
+ avcs: 'image/avcs',
897
+ avif: 'image/avif',
898
+ bmp: 'image/x-ms-bmp',
899
+ cgm: 'image/cgm',
900
+ drle: 'image/dicom-rle',
901
+ fits: 'image/fits',
902
+ g3: 'image/g3fax',
903
+ gif: 'image/gif',
904
+ heic: 'image/heic',
905
+ heics: 'image/heic-sequence',
906
+ heif: 'image/heif',
907
+ heifs: 'image/heif-sequence',
908
+ hej2: 'image/hej2k',
909
+ hsj2: 'image/hsj2',
910
+ ief: 'image/ief',
911
+ jls: 'image/jls',
912
+ jp2: 'image/jp2',
913
+ jpg2: 'image/jp2',
914
+ jpeg: 'image/jpeg',
915
+ jpg: 'image/jpeg',
916
+ jpe: 'image/jpeg',
917
+ jph: 'image/jph',
918
+ jhc: 'image/jphc',
919
+ jpm: 'video/jpm',
920
+ jpx: 'image/jpx',
921
+ jpf: 'image/jpx',
922
+ jxr: 'image/jxr',
923
+ jxra: 'image/jxra',
924
+ jxrs: 'image/jxrs',
925
+ jxs: 'image/jxs',
926
+ jxsc: 'image/jxsc',
927
+ jxsi: 'image/jxsi',
928
+ jxss: 'image/jxss',
929
+ ktx: 'image/ktx',
930
+ ktx2: 'image/ktx2',
931
+ png: 'image/png',
932
+ btif: 'image/prs.btif',
933
+ pti: 'image/prs.pti',
934
+ sgi: 'image/sgi',
935
+ svg: 'image/svg+xml',
936
+ svgz: 'image/svg+xml',
937
+ t38: 'image/t38',
938
+ tif: 'image/tiff',
939
+ tiff: 'image/tiff',
940
+ tfx: 'image/tiff-fx',
941
+ psd: 'image/vnd.adobe.photoshop',
942
+ azv: 'image/vnd.airzip.accelerator.azv',
943
+ uvi: 'image/vnd.dece.graphic',
944
+ uvvi: 'image/vnd.dece.graphic',
945
+ uvg: 'image/vnd.dece.graphic',
946
+ uvvg: 'image/vnd.dece.graphic',
947
+ djvu: 'image/vnd.djvu',
948
+ djv: 'image/vnd.djvu',
949
+ sub: 'text/vnd.dvb.subtitle',
950
+ dwg: 'image/vnd.dwg',
951
+ dxf: 'image/vnd.dxf',
952
+ fbs: 'image/vnd.fastbidsheet',
953
+ fpx: 'image/vnd.fpx',
954
+ fst: 'image/vnd.fst',
955
+ mmr: 'image/vnd.fujixerox.edmics-mmr',
956
+ rlc: 'image/vnd.fujixerox.edmics-rlc',
957
+ ico: 'image/x-icon',
958
+ dds: 'image/vnd.ms-dds',
959
+ mdi: 'image/vnd.ms-modi',
960
+ wdp: 'image/vnd.ms-photo',
961
+ npx: 'image/vnd.net-fpx',
962
+ b16: 'image/vnd.pco.b16',
963
+ tap: 'image/vnd.tencent.tap',
964
+ vtf: 'image/vnd.valve.source.texture',
965
+ wbmp: 'image/vnd.wap.wbmp',
966
+ xif: 'image/vnd.xiff',
967
+ pcx: 'image/x-pcx',
968
+ webp: 'image/webp',
969
+ '3ds': 'image/x-3ds',
970
+ ras: 'image/x-cmu-raster',
971
+ cmx: 'image/x-cmx',
972
+ fh: 'image/x-freehand',
973
+ fhc: 'image/x-freehand',
974
+ fh4: 'image/x-freehand',
975
+ fh5: 'image/x-freehand',
976
+ fh7: 'image/x-freehand',
977
+ jng: 'image/x-jng',
978
+ sid: 'image/x-mrsid-image',
979
+ pic: 'image/x-pict',
980
+ pct: 'image/x-pict',
981
+ pnm: 'image/x-portable-anymap',
982
+ pbm: 'image/x-portable-bitmap',
983
+ pgm: 'image/x-portable-graymap',
984
+ ppm: 'image/x-portable-pixmap',
985
+ rgb: 'image/x-rgb',
986
+ tga: 'image/x-tga',
987
+ xbm: 'image/x-xbitmap',
988
+ xpm: 'image/x-xpixmap',
989
+ xwd: 'image/x-xwindowdump',
990
+ 'disposition-notification': 'message/disposition-notification',
991
+ u8msg: 'message/global',
992
+ u8dsn: 'message/global-delivery-status',
993
+ u8mdn: 'message/global-disposition-notification',
994
+ u8hdr: 'message/global-headers',
995
+ eml: 'message/rfc822',
996
+ mime: 'message/rfc822',
997
+ wsc: 'message/vnd.wfa.wsc',
998
+ '3mf': 'model/3mf',
999
+ gltf: 'model/gltf+json',
1000
+ glb: 'model/gltf-binary',
1001
+ igs: 'model/iges',
1002
+ iges: 'model/iges',
1003
+ msh: 'model/mesh',
1004
+ mesh: 'model/mesh',
1005
+ silo: 'model/mesh',
1006
+ mtl: 'model/mtl',
1007
+ stpx: 'model/step+xml',
1008
+ stpz: 'model/step+zip',
1009
+ stpxz: 'model/step-xml+zip',
1010
+ u3d: 'model/u3d',
1011
+ dae: 'model/vnd.collada+xml',
1012
+ dwf: 'model/vnd.dwf',
1013
+ gdl: 'model/vnd.gdl',
1014
+ gtw: 'model/vnd.gtw',
1015
+ mts: 'model/vnd.mts',
1016
+ ogex: 'model/vnd.opengex',
1017
+ x_b: 'model/vnd.parasolid.transmit.binary',
1018
+ x_t: 'model/vnd.parasolid.transmit.text',
1019
+ vds: 'model/vnd.sap.vds',
1020
+ usdz: 'model/vnd.usdz+zip',
1021
+ bsp: 'model/vnd.valve.source.compiled-map',
1022
+ vtu: 'model/vnd.vtu',
1023
+ wrl: 'model/vrml',
1024
+ vrml: 'model/vrml',
1025
+ x3db: 'model/x3d+fastinfoset',
1026
+ x3dbz: 'model/x3d+binary',
1027
+ x3dv: 'model/x3d-vrml',
1028
+ x3dvz: 'model/x3d+vrml',
1029
+ x3d: 'model/x3d+xml',
1030
+ x3dz: 'model/x3d+xml',
1031
+ appcache: 'text/cache-manifest',
1032
+ manifest: 'text/cache-manifest',
1033
+ ics: 'text/calendar',
1034
+ ifb: 'text/calendar',
1035
+ coffee: 'text/coffeescript',
1036
+ litcoffee: 'text/coffeescript',
1037
+ css: 'text/css',
1038
+ csv: 'text/csv',
1039
+ html: 'text/html',
1040
+ htm: 'text/html',
1041
+ shtml: 'text/html',
1042
+ jade: 'text/jade',
1043
+ jsx: 'text/jsx',
1044
+ less: 'text/less',
1045
+ markdown: 'text/markdown',
1046
+ md: 'text/markdown',
1047
+ mml: 'text/mathml',
1048
+ mdx: 'text/mdx',
1049
+ n3: 'text/n3',
1050
+ txt: 'text/plain',
1051
+ text: 'text/plain',
1052
+ conf: 'text/plain',
1053
+ def: 'text/plain',
1054
+ list: 'text/plain',
1055
+ log: 'text/plain',
1056
+ in: 'text/plain',
1057
+ ini: 'text/plain',
1058
+ dsc: 'text/prs.lines.tag',
1059
+ rtx: 'text/richtext',
1060
+ sgml: 'text/sgml',
1061
+ sgm: 'text/sgml',
1062
+ shex: 'text/shex',
1063
+ slim: 'text/slim',
1064
+ slm: 'text/slim',
1065
+ spdx: 'text/spdx',
1066
+ stylus: 'text/stylus',
1067
+ styl: 'text/stylus',
1068
+ tsv: 'text/tab-separated-values',
1069
+ t: 'text/troff',
1070
+ tr: 'text/troff',
1071
+ roff: 'text/troff',
1072
+ man: 'text/troff',
1073
+ me: 'text/troff',
1074
+ ms: 'text/troff',
1075
+ ttl: 'text/turtle',
1076
+ uri: 'text/uri-list',
1077
+ uris: 'text/uri-list',
1078
+ urls: 'text/uri-list',
1079
+ vcard: 'text/vcard',
1080
+ curl: 'text/vnd.curl',
1081
+ dcurl: 'text/vnd.curl.dcurl',
1082
+ mcurl: 'text/vnd.curl.mcurl',
1083
+ scurl: 'text/vnd.curl.scurl',
1084
+ ged: 'text/vnd.familysearch.gedcom',
1085
+ fly: 'text/vnd.fly',
1086
+ flx: 'text/vnd.fmi.flexstor',
1087
+ gv: 'text/vnd.graphviz',
1088
+ '3dml': 'text/vnd.in3d.3dml',
1089
+ spot: 'text/vnd.in3d.spot',
1090
+ jad: 'text/vnd.sun.j2me.app-descriptor',
1091
+ wml: 'text/vnd.wap.wml',
1092
+ wmls: 'text/vnd.wap.wmlscript',
1093
+ vtt: 'text/vtt',
1094
+ s: 'text/x-asm',
1095
+ asm: 'text/x-asm',
1096
+ c: 'text/x-c',
1097
+ cc: 'text/x-c',
1098
+ cxx: 'text/x-c',
1099
+ cpp: 'text/x-c',
1100
+ h: 'text/x-c',
1101
+ hh: 'text/x-c',
1102
+ dic: 'text/x-c',
1103
+ htc: 'text/x-component',
1104
+ f: 'text/x-fortran',
1105
+ for: 'text/x-fortran',
1106
+ f77: 'text/x-fortran',
1107
+ f90: 'text/x-fortran',
1108
+ hbs: 'text/x-handlebars-template',
1109
+ java: 'text/x-java-source',
1110
+ lua: 'text/x-lua',
1111
+ mkd: 'text/x-markdown',
1112
+ nfo: 'text/x-nfo',
1113
+ opml: 'text/x-opml',
1114
+ p: 'text/x-pascal',
1115
+ pas: 'text/x-pascal',
1116
+ pde: 'text/x-processing',
1117
+ sass: 'text/x-sass',
1118
+ scss: 'text/x-scss',
1119
+ etx: 'text/x-setext',
1120
+ sfv: 'text/x-sfv',
1121
+ ymp: 'text/x-suse-ymp',
1122
+ uu: 'text/x-uuencode',
1123
+ vcs: 'text/x-vcalendar',
1124
+ vcf: 'text/x-vcard',
1125
+ yaml: 'text/yaml',
1126
+ yml: 'text/yaml',
1127
+ '3gp': 'video/3gpp',
1128
+ '3g2': 'video/3gpp2',
1129
+ h261: 'video/h261',
1130
+ h263: 'video/h263',
1131
+ h264: 'video/h264',
1132
+ m4s: 'video/iso.segment',
1133
+ jpgv: 'video/jpeg',
1134
+ jpgm: 'video/jpm',
1135
+ mj2: 'video/mj2',
1136
+ mjp2: 'video/mj2',
1137
+ ts: 'video/mp2t',
1138
+ mp4: 'video/mp4',
1139
+ mp4v: 'video/mp4',
1140
+ mpg4: 'video/mp4',
1141
+ mpeg: 'video/mpeg',
1142
+ mpg: 'video/mpeg',
1143
+ mpe: 'video/mpeg',
1144
+ m1v: 'video/mpeg',
1145
+ m2v: 'video/mpeg',
1146
+ ogv: 'video/ogg',
1147
+ qt: 'video/quicktime',
1148
+ mov: 'video/quicktime',
1149
+ uvh: 'video/vnd.dece.hd',
1150
+ uvvh: 'video/vnd.dece.hd',
1151
+ uvm: 'video/vnd.dece.mobile',
1152
+ uvvm: 'video/vnd.dece.mobile',
1153
+ uvp: 'video/vnd.dece.pd',
1154
+ uvvp: 'video/vnd.dece.pd',
1155
+ uvs: 'video/vnd.dece.sd',
1156
+ uvvs: 'video/vnd.dece.sd',
1157
+ uvv: 'video/vnd.dece.video',
1158
+ uvvv: 'video/vnd.dece.video',
1159
+ dvb: 'video/vnd.dvb.file',
1160
+ fvt: 'video/vnd.fvt',
1161
+ mxu: 'video/vnd.mpegurl',
1162
+ m4u: 'video/vnd.mpegurl',
1163
+ pyv: 'video/vnd.ms-playready.media.pyv',
1164
+ uvu: 'video/vnd.uvvu.mp4',
1165
+ uvvu: 'video/vnd.uvvu.mp4',
1166
+ viv: 'video/vnd.vivo',
1167
+ webm: 'video/webm',
1168
+ f4v: 'video/x-f4v',
1169
+ fli: 'video/x-fli',
1170
+ flv: 'video/x-flv',
1171
+ m4v: 'video/x-m4v',
1172
+ mkv: 'video/x-matroska',
1173
+ mk3d: 'video/x-matroska',
1174
+ mks: 'video/x-matroska',
1175
+ mng: 'video/x-mng',
1176
+ asf: 'video/x-ms-asf',
1177
+ asx: 'video/x-ms-asf',
1178
+ vob: 'video/x-ms-vob',
1179
+ wm: 'video/x-ms-wm',
1180
+ wmv: 'video/x-ms-wmv',
1181
+ wmx: 'video/x-ms-wmx',
1182
+ wvx: 'video/x-ms-wvx',
1183
+ avi: 'video/x-msvideo',
1184
+ movie: 'video/x-sgi-movie',
1185
+ smv: 'video/x-smv',
1186
+ ice: 'x-conference/x-cooltalk',
1212
1187
  };
1213
1188
 
1214
- function getMimeType(path, fallback = null) {
1215
- const ext = (/\.([^.]+)$/.exec(path) || [])[1] || path;
1216
- return extensions[ext] || fallback;
1189
+ function getMimeType(path, fallback = null) {
1190
+ const ext = (/\.([^.]+)$/.exec(path) || [])[1] || path;
1191
+ return extensions[ext] || fallback;
1217
1192
  }
1218
1193
 
1219
- function normalizePath(filePath, baseDir) {
1220
- return path.normalize(path.join(filePath.startsWith('/') || (baseDir && baseDir.startsWith('/')) ? '' : process.cwd(), baseDir || '', filePath));
1194
+ function normalizePath(filePath, baseDir) {
1195
+ return path.normalize(path.join(filePath.startsWith('/') || (baseDir && baseDir.startsWith('/')) ? '' : process.cwd(), baseDir || '', filePath));
1221
1196
  }
1222
1197
 
1223
- const { stat, readdir } = promises;
1224
- // export function statFile(path: string) {
1225
- // return stat(path)
1226
- // }
1227
- function serveFile(filePath, options = {}) {
1228
- return __awaiter(this, void 0, void 0, function* () {
1229
- const { restoreCtx } = useHttpContext();
1230
- const { status } = useResponse();
1231
- const { setHeader, removeHeader } = useSetHeaders();
1232
- const headers = useHeaders();
1233
- const { method, url } = useRequest();
1234
- const { setCacheControl, setExpires, setPragmaNoCache } = useSetCacheControl();
1235
- const normalizedPath = normalizePath(filePath, options.baseDir);
1236
- let fileStats;
1237
- try {
1238
- fileStats = yield stat(normalizedPath);
1239
- }
1240
- catch (e) {
1241
- if (options.defaultExt) {
1242
- const ext = path.extname(filePath);
1243
- if (!ext) {
1244
- restoreCtx();
1245
- return serveFile(filePath + '.' + options.defaultExt);
1246
- }
1247
- }
1248
- throw new HttpError(404);
1249
- }
1250
- status(200);
1251
- // if-none-match & if-modified-since processing start
1252
- // rfc7232
1253
- const etag = `"${[
1254
- fileStats.ino,
1255
- fileStats.size,
1256
- fileStats.mtime.toISOString(),
1257
- ].join('-')}"`;
1258
- const lastModified = new Date(fileStats.mtime);
1259
- if (isNotModified(etag, lastModified, headers['if-none-match'] || '', headers['if-modified-since'] || '')) {
1260
- status(304);
1261
- return '';
1262
- }
1263
- // if-none-match & if-modified-since processing end
1264
- setHeader('etag', etag);
1265
- setHeader('last-modified', lastModified.toUTCString());
1266
- if (options.cacheControl !== undefined) {
1267
- setCacheControl(options.cacheControl);
1268
- }
1269
- if (options.expires) {
1270
- setExpires(options.expires);
1271
- }
1272
- if (options.pragmaNoCache) {
1273
- setPragmaNoCache(options.pragmaNoCache);
1274
- }
1275
- if (fileStats.isDirectory()) {
1276
- if (options.listDirectory) {
1277
- restoreCtx();
1278
- return listDirectory(normalizedPath);
1279
- }
1280
- else if (options.index) {
1281
- if (filePath[filePath.length - 1] !== '/' &&
1282
- url &&
1283
- url[url.length - 1] !== '/') {
1284
- return new BaseHttpResponse()
1285
- .setStatus(302)
1286
- .setHeader('location', url + '/');
1287
- }
1288
- restoreCtx();
1289
- return serveFile(path.join(filePath, options.index), Object.assign(Object.assign({}, options), { index: '' }));
1290
- }
1291
- removeHeader('etag');
1292
- removeHeader('last-modified');
1293
- throw new HttpError(404);
1294
- }
1295
- // range header processing start
1296
- let range = headers.range;
1297
- let start, end;
1298
- let size = fileStats.size;
1299
- if (range) {
1300
- const rangeParts = range
1301
- .trim()
1302
- .replace(/bytes=/, '')
1303
- .split('-');
1304
- const [s, e] = rangeParts;
1305
- start = parseInt(s);
1306
- end = e ? parseInt(e) : size - 1;
1307
- end = Math.min(size - 1, end);
1308
- if (start > end || isNaN(start) || isNaN(end)) {
1309
- throw new HttpError(416);
1310
- }
1311
- size = end - start + 1;
1312
- // if-range processing start
1313
- // rfc7233#section-3.2\
1314
- const ifRange = headers['if-range'] || '';
1315
- const ifRangeTag = ifRange[0] === '"' ? ifRange : '';
1316
- const ifRangeDate = ifRangeTag ? '' : ifRange;
1317
- if (ifRange &&
1318
- !isNotModified(etag, lastModified, ifRangeTag, ifRangeDate)) {
1319
- // If the validator does not match, the server MUST ignore
1320
- // the Range header field.
1321
- status(200);
1322
- size = fileStats.size;
1323
- range = '';
1324
- }
1325
- else {
1326
- // If the validator given in the If-Range header field matches the
1327
- // current validator for the selected representation of the target
1328
- // resource, then the server SHOULD process the Range header field as
1329
- // requested.
1330
- setHeader('content-range', `bytes ${start}-${end}/${fileStats.size}`);
1331
- status(206);
1332
- }
1333
- // if-range processing end
1334
- }
1335
- // range header processing end
1336
- setHeader('accept-ranges', 'bytes');
1337
- setHeader('content-type', getMimeType(normalizedPath) || 'application/octet-stream');
1338
- setHeader('content-length', size);
1339
- if (options.headers) {
1340
- for (const header of Object.keys(options.headers)) {
1341
- setHeader(header, options.headers[header]);
1342
- }
1343
- }
1344
- return method === 'HEAD'
1345
- ? ''
1346
- : createReadStream(normalizedPath, !!range ? { start, end } : undefined);
1347
- });
1348
- }
1349
- // function toWeak(etag: string): string {
1350
- // return `W/${etag}`
1351
- // }
1352
- function isNotModified(etag, lastModified, clientEtag, clientLM) {
1353
- if (clientEtag) {
1354
- const parts = clientEtag.split(',').map((v) => v.trim());
1355
- for (const p of parts) {
1356
- if (etag === p) {
1357
- return true;
1358
- }
1359
- }
1360
- // A recipient MUST ignore If-Modified-Since if the request contains an
1361
- // If-None-Match header field; the condition in If-None-Match is
1362
- // considered to be a more accurate replacement for the condition in
1363
- // If-Modified-Since, and the two are only combined for the sake of
1364
- // interoperating with older intermediaries that might not implement
1365
- // If-None-Match.
1366
- return false;
1367
- }
1368
- const date = new Date(clientLM);
1369
- // A recipient MUST ignore the If-Modified-Since header field if the
1370
- // received field-value is not a valid HTTP-date, or if the request
1371
- // method is neither GET nor HEAD.
1372
- if (date.toString() !== 'Invalid Date' &&
1373
- date.getTime() > lastModified.getTime()) {
1374
- return true;
1375
- }
1376
- return false;
1377
- }
1378
- function listDirectory(dirPath) {
1379
- return __awaiter(this, void 0, void 0, function* () {
1380
- const { setContentType } = useSetHeaders();
1381
- const { url } = useRequest();
1382
- const list = yield readdir(dirPath);
1383
- const promises = [];
1384
- let detailedList = [];
1385
- for (const item of list) {
1386
- promises.push({ name: item, promise: stat(path.join(dirPath, item)) });
1387
- }
1388
- for (const item of promises) {
1389
- const data = yield item.promise;
1390
- detailedList.push({
1391
- name: item.name,
1392
- size: data.size,
1393
- mtime: data.mtime,
1394
- dir: data.isDirectory(),
1395
- });
1396
- }
1397
- detailedList = detailedList.sort((a, b) => a.dir === b.dir ? (a.name > b.name ? 1 : -1) : a.dir > b.dir ? -1 : 1);
1398
- detailedList.unshift({ name: '..', dir: true });
1399
- setContentType('text/html');
1400
- const styles = '<style type="text/css">\nhtml { font-family: monospace }\n' +
1401
- 'span { padding: 0px 2px }\n' +
1402
- '.text { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }\n' +
1403
- '.icon { width: 20px; display: inline-block; text-align: center; }\n' +
1404
- '.name { width: 250px; display: inline-block; }\n' +
1405
- '.size { width: 80px; display: inline-block; color: grey; text-align: right; }\n' +
1406
- '.date { width: 200px; display: inline-block; color: grey; text-align: right; }\n' +
1407
- '\n</style>';
1408
- return ('<html><head><title>Dir</title> ' +
1409
- styles +
1410
- ' </head><body><ul>' +
1411
- detailedList
1412
- .map((d) => `<li> <span class="icon">${d.dir ? '&#128193;' : '&#128462;'}</span>` +
1413
- `<a href="${path.join(url || '', d.name)}"><span class="name text">${d.name}</span></a>` +
1414
- `<span class="size text">${(d.size &&
1415
- (d.size > 10000
1416
- ? Math.round(d.size / 1024 / 1024).toString() +
1417
- 'Mb'
1418
- : Math.round(d.size / 1024).toString() +
1419
- 'Kb')) ||
1420
- ''}</span>` +
1421
- `<span class="date text">${(d.mtime && d.mtime.toISOString()) || ''}</li>`)
1422
- .join('\n') +
1423
- '</ul></body></html>');
1424
- });
1198
+ const { stat, readdir } = promises;
1199
+ async function serveFile(filePath, options = {}) {
1200
+ if (!options.allowDotDot && (/\/\.\.\//.test(filePath) || /^\.\.\//.test(filePath))) {
1201
+ throw new Error('Parent Traversal ("/../") is not allowed.');
1202
+ }
1203
+ const { restoreCtx } = useHttpContext();
1204
+ const { status } = useResponse();
1205
+ const { setHeader, removeHeader } = useSetHeaders();
1206
+ const headers = useHeaders();
1207
+ const { method, url } = useRequest();
1208
+ const { setCacheControl, setExpires, setPragmaNoCache } = useSetCacheControl();
1209
+ const normalizedPath = normalizePath(filePath, options.baseDir);
1210
+ let fileStats;
1211
+ try {
1212
+ fileStats = await stat(normalizedPath);
1213
+ }
1214
+ catch (e) {
1215
+ if (options.defaultExt) {
1216
+ const ext = path.extname(filePath);
1217
+ if (!ext) {
1218
+ restoreCtx();
1219
+ return serveFile(filePath + '.' + options.defaultExt);
1220
+ }
1221
+ }
1222
+ throw new HttpError(404);
1223
+ }
1224
+ status(200);
1225
+ // if-none-match & if-modified-since processing start
1226
+ // rfc7232
1227
+ const etag = `"${[
1228
+ fileStats.ino,
1229
+ fileStats.size,
1230
+ fileStats.mtime.toISOString(),
1231
+ ].join('-')}"`;
1232
+ const lastModified = new Date(fileStats.mtime);
1233
+ if (isNotModified(etag, lastModified, headers['if-none-match'] || '', headers['if-modified-since'] || '')) {
1234
+ status(304);
1235
+ return '';
1236
+ }
1237
+ // if-none-match & if-modified-since processing end
1238
+ setHeader('etag', etag);
1239
+ setHeader('last-modified', lastModified.toUTCString());
1240
+ if (options.cacheControl !== undefined) {
1241
+ setCacheControl(options.cacheControl);
1242
+ }
1243
+ if (options.expires) {
1244
+ setExpires(options.expires);
1245
+ }
1246
+ if (options.pragmaNoCache) {
1247
+ setPragmaNoCache(options.pragmaNoCache);
1248
+ }
1249
+ if (fileStats.isDirectory()) {
1250
+ if (options.listDirectory) {
1251
+ restoreCtx();
1252
+ return listDirectory(normalizedPath);
1253
+ }
1254
+ else if (options.index) {
1255
+ if (filePath[filePath.length - 1] !== '/' &&
1256
+ url &&
1257
+ url[url.length - 1] !== '/') {
1258
+ return new BaseHttpResponse()
1259
+ .setStatus(302)
1260
+ .setHeader('location', url + '/');
1261
+ }
1262
+ restoreCtx();
1263
+ return serveFile(path.join(filePath, options.index), {
1264
+ ...options,
1265
+ index: '',
1266
+ });
1267
+ }
1268
+ removeHeader('etag');
1269
+ removeHeader('last-modified');
1270
+ throw new HttpError(404);
1271
+ }
1272
+ // range header processing start
1273
+ let range = headers.range;
1274
+ let start, end;
1275
+ let size = fileStats.size;
1276
+ if (range) {
1277
+ const rangeParts = range
1278
+ .trim()
1279
+ .replace(/bytes=/, '')
1280
+ .split('-');
1281
+ const [s, e] = rangeParts;
1282
+ start = parseInt(s);
1283
+ end = e ? parseInt(e) : size - 1;
1284
+ end = Math.min(size - 1, end);
1285
+ if (start > end || isNaN(start) || isNaN(end)) {
1286
+ throw new HttpError(416);
1287
+ }
1288
+ size = end - start + 1;
1289
+ // if-range processing start
1290
+ // rfc7233#section-3.2\
1291
+ const ifRange = headers['if-range'] || '';
1292
+ const ifRangeTag = ifRange[0] === '"' ? ifRange : '';
1293
+ const ifRangeDate = ifRangeTag ? '' : ifRange;
1294
+ if (ifRange &&
1295
+ !isNotModified(etag, lastModified, ifRangeTag, ifRangeDate)) {
1296
+ // If the validator does not match, the server MUST ignore
1297
+ // the Range header field.
1298
+ status(200);
1299
+ size = fileStats.size;
1300
+ range = '';
1301
+ }
1302
+ else {
1303
+ // If the validator given in the If-Range header field matches the
1304
+ // current validator for the selected representation of the target
1305
+ // resource, then the server SHOULD process the Range header field as
1306
+ // requested.
1307
+ setHeader('content-range', `bytes ${start}-${end}/${fileStats.size}`);
1308
+ status(206);
1309
+ }
1310
+ // if-range processing end
1311
+ }
1312
+ // range header processing end
1313
+ setHeader('accept-ranges', 'bytes');
1314
+ setHeader('content-type', getMimeType(normalizedPath) || 'application/octet-stream');
1315
+ setHeader('content-length', size);
1316
+ if (options.headers) {
1317
+ for (const header of Object.keys(options.headers)) {
1318
+ setHeader(header, options.headers[header]);
1319
+ }
1320
+ }
1321
+ return method === 'HEAD'
1322
+ ? ''
1323
+ : createReadStream(normalizedPath, !!range ? { start, end } : undefined);
1324
+ }
1325
+ // function toWeak(etag: string): string {
1326
+ // return `W/${etag}`
1327
+ // }
1328
+ function isNotModified(etag, lastModified, clientEtag, clientLM) {
1329
+ if (clientEtag) {
1330
+ const parts = clientEtag.split(',').map((v) => v.trim());
1331
+ for (const p of parts) {
1332
+ if (etag === p) {
1333
+ return true;
1334
+ }
1335
+ }
1336
+ // A recipient MUST ignore If-Modified-Since if the request contains an
1337
+ // If-None-Match header field; the condition in If-None-Match is
1338
+ // considered to be a more accurate replacement for the condition in
1339
+ // If-Modified-Since, and the two are only combined for the sake of
1340
+ // interoperating with older intermediaries that might not implement
1341
+ // If-None-Match.
1342
+ return false;
1343
+ }
1344
+ const date = new Date(clientLM);
1345
+ // A recipient MUST ignore the If-Modified-Since header field if the
1346
+ // received field-value is not a valid HTTP-date, or if the request
1347
+ // method is neither GET nor HEAD.
1348
+ if (date.toString() !== 'Invalid Date' &&
1349
+ date.getTime() > lastModified.getTime()) {
1350
+ return true;
1351
+ }
1352
+ return false;
1353
+ }
1354
+ async function listDirectory(dirPath) {
1355
+ const { setContentType } = useSetHeaders();
1356
+ const { url } = useRequest();
1357
+ const list = await readdir(dirPath);
1358
+ const promises = [];
1359
+ let detailedList = [];
1360
+ for (const item of list) {
1361
+ promises.push({ name: item, promise: stat(path.join(dirPath, item)) });
1362
+ }
1363
+ for (const item of promises) {
1364
+ const data = await item.promise;
1365
+ detailedList.push({
1366
+ name: item.name,
1367
+ size: data.size,
1368
+ mtime: data.mtime,
1369
+ dir: data.isDirectory(),
1370
+ });
1371
+ }
1372
+ detailedList = detailedList.sort((a, b) => a.dir === b.dir ? (a.name > b.name ? 1 : -1) : a.dir > b.dir ? -1 : 1);
1373
+ detailedList.unshift({ name: '..', dir: true });
1374
+ setContentType('text/html');
1375
+ const styles = '<style type="text/css">\nhtml { font-family: monospace }\n' +
1376
+ 'span { padding: 0px 2px }\n' +
1377
+ '.text { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }\n' +
1378
+ '.icon { width: 20px; display: inline-block; text-align: center; }\n' +
1379
+ '.name { width: 250px; display: inline-block; }\n' +
1380
+ '.size { width: 80px; display: inline-block; color: grey; text-align: right; }\n' +
1381
+ '.date { width: 200px; display: inline-block; color: grey; text-align: right; }\n' +
1382
+ '\n</style>';
1383
+ return ('<html><head><title>Dir</title> ' +
1384
+ styles +
1385
+ ' </head><body><ul>' +
1386
+ detailedList
1387
+ .map((d) => `<li> <span class="icon">${d.dir ? '&#128193;' : '&#128462;'}</span>` +
1388
+ `<a href="${path.join(url || '', d.name)}"><span class="name text">${d.name}</span></a>` +
1389
+ `<span class="size text">${(d.size &&
1390
+ (d.size > 10000
1391
+ ? Math.round(d.size / 1024 / 1024).toString() +
1392
+ 'Mb'
1393
+ : Math.round(d.size / 1024).toString() +
1394
+ 'Kb')) ||
1395
+ ''}</span>` +
1396
+ `<span class="date text">${(d.mtime && d.mtime.toISOString()) || ''}</li>`)
1397
+ .join('\n') +
1398
+ '</ul></body></html>');
1425
1399
  }
1426
1400
 
1427
1401
  export { serveFile };