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
5module.exports = {
6 md: 'text/markdown',
7 markdown: 'text/markdown',
8 mp4: 'video/mp4',
9 mp3: 'audio/mp3',
10 svg: 'image/svg+xml',
11 jpg: 'image/jpeg',
12 png: 'image/png',
13 gif: 'image/gif',
14 heic: 'image/heic',
15 heif: 'image/heif',
16 yaml: 'text/yaml',
17 yml: 'text/yaml',
18 csv: 'text/csv',
19 tsv: 'text/tab-separated-values',
20 tab: 'text/tab-separated-values',
21 avi: 'video/x-msvideo',
22 mks: 'video/x-matroska',
23 mkv: 'video/x-matroska',
24 mov: 'video/quicktime',
25 doc: 'application/msword',
26 docm: 'application/vnd.ms-word.document.macroenabled.12',
27 docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
28 dot: 'application/msword',
29 dotm: 'application/vnd.ms-word.template.macroenabled.12',
30 dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
31 xla: 'application/vnd.ms-excel',
32 xlam: 'application/vnd.ms-excel.addin.macroenabled.12',
33 xlc: 'application/vnd.ms-excel',
34 xlf: 'application/x-xliff+xml',
35 xlm: 'application/vnd.ms-excel',
36 xls: 'application/vnd.ms-excel',
37 xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
38 xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',
39 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
40 xlt: 'application/vnd.ms-excel',
41 xltm: 'application/vnd.ms-excel.template.macroenabled.12',
42 xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
43 xlw: 'application/vnd.ms-excel',
44 txt: 'text/plain',
45 text: 'text/plain',
46 conf: 'text/plain',
47 log: 'text/plain',
48 pdf: 'application/pdf'
49};
\No newline at end of file