UNPKG

1.82 kBJavaScriptView Raw
1// ___Why not add the mime-types package?
2// It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).
3// ___Where to take new extensions from?
4// https://github.com/jshttp/mime-db/blob/master/db.json
5
6module.exports = {
7 md: 'text/markdown',
8 markdown: 'text/markdown',
9 mp4: 'video/mp4',
10 mp3: 'audio/mp3',
11 svg: 'image/svg+xml',
12 jpg: 'image/jpeg',
13 png: 'image/png',
14 gif: 'image/gif',
15 heic: 'image/heic',
16 heif: 'image/heif',
17 yaml: 'text/yaml',
18 yml: 'text/yaml',
19 csv: 'text/csv',
20 tsv: 'text/tab-separated-values',
21 tab: 'text/tab-separated-values',
22 avi: 'video/x-msvideo',
23 mks: 'video/x-matroska',
24 mkv: 'video/x-matroska',
25 mov: 'video/quicktime',
26 doc: 'application/msword',
27 docm: 'application/vnd.ms-word.document.macroenabled.12',
28 docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
29 dot: 'application/msword',
30 dotm: 'application/vnd.ms-word.template.macroenabled.12',
31 dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
32 xla: 'application/vnd.ms-excel',
33 xlam: 'application/vnd.ms-excel.addin.macroenabled.12',
34 xlc: 'application/vnd.ms-excel',
35 xlf: 'application/x-xliff+xml',
36 xlm: 'application/vnd.ms-excel',
37 xls: 'application/vnd.ms-excel',
38 xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
39 xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',
40 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
41 xlt: 'application/vnd.ms-excel',
42 xltm: 'application/vnd.ms-excel.template.macroenabled.12',
43 xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
44 xlw: 'application/vnd.ms-excel',
45 txt: 'text/plain',
46 text: 'text/plain',
47 conf: 'text/plain',
48 log: 'text/plain',
49 pdf: 'application/pdf'
50}