UNPKG

@uppy/utils

Version:

Shared utility functions for Uppy Core and plugins maintained by the Uppy team.

59 lines (58 loc) 2.09 kB
// ___Why not add the mime-types package? // It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews). // ___Where to take new extensions from? // https://github.com/jshttp/mime-db/blob/master/db.json export default { __proto__: null, md: 'text/markdown', markdown: 'text/markdown', mp4: 'video/mp4', mp3: 'audio/mp3', svg: 'image/svg+xml', jpg: 'image/jpeg', png: 'image/png', webp: 'image/webp', gif: 'image/gif', heic: 'image/heic', heif: 'image/heif', yaml: 'text/yaml', yml: 'text/yaml', csv: 'text/csv', tsv: 'text/tab-separated-values', tab: 'text/tab-separated-values', avi: 'video/x-msvideo', mks: 'video/x-matroska', mkv: 'video/x-matroska', mov: 'video/quicktime', dicom: 'application/dicom', doc: 'application/msword', docm: 'application/vnd.ms-word.document.macroenabled.12', docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', dot: 'application/msword', dotm: 'application/vnd.ms-word.template.macroenabled.12', dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', xla: 'application/vnd.ms-excel', xlam: 'application/vnd.ms-excel.addin.macroenabled.12', xlc: 'application/vnd.ms-excel', xlf: 'application/x-xliff+xml', xlm: 'application/vnd.ms-excel', xls: 'application/vnd.ms-excel', xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12', xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12', xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', xlt: 'application/vnd.ms-excel', xltm: 'application/vnd.ms-excel.template.macroenabled.12', xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', xlw: 'application/vnd.ms-excel', txt: 'text/plain', text: 'text/plain', conf: 'text/plain', log: 'text/plain', pdf: 'application/pdf', zip: 'application/zip', '7z': 'application/x-7z-compressed', rar: 'application/x-rar-compressed', tar: 'application/x-tar', gz: 'application/gzip', dmg: 'application/x-apple-diskimage' };