Created
January 14, 2021 19:53
-
-
Save stevepentler/94aacc7fa78daf30a5ffbbd47cf4af0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EXTENSION_TO_MIMETYPE_MAP = { | |
| "3fr" => "image/x-hasselblad-3fr", | |
| "aa" => "audio/audible", | |
| "aae" => "application/vnd.apple.photos", | |
| "ai" => "application/vnd.adobe.illustrator", | |
| "aiff" => "audio/x-aiff", | |
| "alias" => "application/x-macos", | |
| "ape" => "audio/x-monkeys-audio", | |
| "apng" => "image/apng", | |
| "asf" => "video/x-ms-asf", | |
| "arw" => "image/x-sony-arw", | |
| "avi" => "video/x-msvideo", | |
| "bmp" => "image/bmp", | |
| "bpg" => "image/bpg", | |
| "btf" => "image/x-tiff-big", | |
| "bz2" => "application/bzip2", | |
| "canon 1d raw" => "image/x-raw", | |
| "chm" => "application/x-chm", | |
| "cos" => "application/octet-stream", | |
| "cr2" => "image/x-canon-cr2", | |
| "cr3" => "image/x-canon-cr3", | |
| "crm" => "video/x-canon-crm", | |
| "crw" => "image/x-canon-crw", | |
| "csv" => "text/csv", | |
| "czi" => "image/x-zeiss-czi", | |
| "dcm" => "application/dicom", | |
| "dcp" => "application/octet-stream", | |
| "dcr" => "image/x-kodak-dcr", | |
| "dcx" => "image/dcx", | |
| "dex" => "application/octet-stream", | |
| "dfont" => "application/x-dfont", | |
| "dicom" => "application/dicom", | |
| "divx" => "video/divx", | |
| "djvu" => "image/vnd.djvu", | |
| "dng" => "image/x-adobe-dng", | |
| "doc" => "application/msword", | |
| "docm" => "application/vnd.ms-word.document.macroEnabled", | |
| "docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", | |
| "dot" => "application/msword", | |
| "dotm" => "application/vnd.ms-word.template.macroEnabledTemplate", | |
| "dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", | |
| "dpx" => "image/x-dpx", | |
| "dr4" => "application/octet-stream", | |
| "ds2" => "audio/x-ds2", | |
| "dss" => "audio/x-dss", | |
| "dv" => "video/x-dv", | |
| "dvr-ms" => "video/x-ms-dvr", | |
| "dwf" => "model/vnd.dwf", | |
| "dwg" => "image/vnd.dwg", | |
| "eip" => "application/x-captureone", | |
| "eps" => "application/postscript", | |
| "erf" => "image/x-epson-erf", | |
| "exe" => "application/octet-stream", | |
| "exr" => "image/x-exr", | |
| "exv" => "image/x-exv", | |
| "fff" => "image/x-hasselblad-fff", | |
| "fits" => "image/fits", | |
| "fla" => "application/vnd.adobe.fla", | |
| "flac" => "audio/flac", | |
| "flif" => "image/flif", | |
| "flir" => "image/x-flir-fff", | |
| "flv" => "video/x-flv", | |
| "font" => "application/x-font-type1", | |
| "fpf" => "image/x-flir-fpf", | |
| "fpx" => "image/vnd.fpx", | |
| "gif" => "image/gif", | |
| "gpr" => "image/x-gopro-gpr", | |
| "gzip" => "application/x-gzip", | |
| "hdp" => "image/vnd.ms-photo", | |
| "hdr" => "image/vnd.radiance", | |
| "heic" => "image/heic", | |
| "heif" => "image/heif", | |
| "htm" => "text/html", | |
| "html" => "text/html", | |
| "icc" => "application/vnd.iccprofile", | |
| "ico" => "image/x-icon", | |
| "ics" => "text/calendar", | |
| "idml" => "application/vnd.adobe.indesign-idml-package", | |
| "iiq" => "image/x-raw", | |
| "ind" => "application/x-indesign", | |
| "inx" => "application/x-indesign-interchange", | |
| "iso" => "application/x-iso9660-image", | |
| "itc" => "application/itunes", | |
| "j2c" => "image/x-j2c", | |
| "jng" => "image/jng", | |
| "jp2" => "image/jp2", | |
| "jpg" => "image/jpeg", | |
| "jpeg" => "image/jpeg", | |
| "jpm" => "image/jpm", | |
| "jpx" => "image/jpx", | |
| "json" => "application/json", | |
| "jxr" => "image/jxr", | |
| "k25" => "image/x-kodak-k25", | |
| "kdc" => "image/x-kodak-kdc", | |
| "key" => "application/x-iwork-keynote-sffkey", | |
| "lfp" => "image/x-lytro-lfp", | |
| "lnk" => "application/octet-stream", | |
| "lri" => "image/x-light-lri", | |
| "m2t" => "video/mpeg", | |
| "m2ts" => "video/m2ts", | |
| "max" => "application/x-3ds", | |
| "mef" => "image/x-mamiya-mef", | |
| "mie" => "application/x-mie", | |
| "miff" => "application/x-magick-image", | |
| "mka" => "audio/x-matroska", | |
| "mks" => "application/x-matroska", | |
| "mkv" => "video/x-matroska", | |
| "mng" => "video/mng", | |
| "mobi" => "application/x-mobipocket-ebook", | |
| "moi" => "application/octet-stream", | |
| "mos" => "image/x-raw", | |
| "mov" => "video/quicktime", | |
| "mp3" => "audio/mpeg", | |
| "mp4" => "video/mp4", | |
| "mpc" => "audio/x-musepack", | |
| "mpeg" => "video/mpeg", | |
| "mrw" => "image/x-minolta-mrw", | |
| "mxf" => "application/mxf", | |
| "nef" => "image/x-nikon-nef", | |
| "nrw" => "image/x-nikon-nrw", | |
| "numbers" => "application/x-iwork-numbers-sffnumbers", | |
| "odb" => "application/vnd.oasis.opendocument.database", | |
| "odc" => "application/vnd.oasis.opendocument.chart", | |
| "odf" => "application/vnd.oasis.opendocument.formula", | |
| "odg" => "application/vnd.oasis.opendocument.graphics", | |
| "odi" => "application/vnd.oasis.opendocument.image", | |
| "odp" => "application/vnd.oasis.opendocument.presentation", | |
| "ods" => "application/vnd.oasis.opendocument.spreadsheet", | |
| "odt" => "application/vnd.oasis.opendocument.text", | |
| "ogg" => "audio/ogg", | |
| "ogv" => "video/ogg", | |
| "onp" => "application/on1", | |
| "orf" => "image/x-olympus-orf", | |
| "otf" => "application/x-font-otf", | |
| "pages" => "application/x-iwork-pages-sffpages", | |
| "pbm" => "image/x-portable-bitmap", | |
| "pcd" => "image/x-photo-cd", | |
| "pcx" => "image/pcx", | |
| "pdb" => "application/vnd.palm", | |
| "pdf" => "application/pdf", | |
| "pef" => "image/x-pentax-pef", | |
| "pfa" => "application/x-font-type1", | |
| "pgf" => "image/pgf", | |
| "pgm" => "image/x-portable-graymap", | |
| "php" => "application/x-httpd-php", | |
| "pict" => "image/pict", | |
| "plist" => "application/xml", | |
| "pmp" => "image/x-sony-pmp", | |
| "png" => "image/png", | |
| "pot" => "application/vnd.ms-powerpoint", | |
| "potm" => "application/vnd.ms-powerpoint.template.macroEnabled", | |
| "potx" => "application/vnd.openxmlformats-officedocument.presentationml.template", | |
| "ppam" => "application/vnd.ms-powerpoint.addin.macroEnabled", | |
| "ppax" => "application/vnd.openxmlformats-officedocument.presentationml.addin", | |
| "ppm" => "image/x-portable-pixmap", | |
| "pps" => "application/vnd.ms-powerpoint", | |
| "ppsm" => "application/vnd.ms-powerpoint.slideshow.macroEnabled", | |
| "ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", | |
| "ppt" => "application/vnd.ms-powerpoint", | |
| "pptm" => "application/vnd.ms-powerpoint.presentation.macroEnabled", | |
| "pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", | |
| "ps" => "application/postscript", | |
| "psd" => "application/vnd.adobe.photoshop", | |
| "psp" => "image/x-paintshoppro", | |
| "qtif" => "image/x-quicktime", | |
| "r3d" => "video/x-red-r3d", | |
| "ra" => "audio/x-pn-realaudio", | |
| "raf" => "image/x-fujifilm-raf", | |
| "ram" => "audio/x-pn-realaudio", | |
| "rar" => "application/x-rar-compressed", | |
| "raw" => "image/x-raw", | |
| "rm" => "application/vnd.rn-realmedia", | |
| "rmvb" => "application/vnd.rn-realmedia-vbr", | |
| "rpm" => "audio/x-pn-realaudio-plugin", | |
| "rsrc" => "application/ResEdit", | |
| "rtf" => "text/rtf", | |
| "rv" => "video/vnd.rn-realvideo", | |
| "rw2" => "image/x-panasonic-rw2", | |
| "rwl" => "image/x-leica-rwl", | |
| "rwz" => "image/x-rawzor", | |
| "seq" => "image/x-flir-seq", | |
| "sketch" => "application/sketch", | |
| "sr2" => "image/x-sony-sr2", | |
| "srf" => "image/x-sony-srf", | |
| "srw" => "image/x-samsung-srw", | |
| "svg" => "image/svg+xml", | |
| "swf" => "application/x-shockwave-flash", | |
| "tar" => "application/x-tar", | |
| "thmx" => "application/vnd.ms-officetheme", | |
| "tif" => "image/tiff", | |
| "tiff" => "image/tiff", | |
| "torrent" => "application/x-bittorrent", | |
| "ttc" => "application/x-font-ttf", | |
| "ttf" => "application/x-font-ttf", | |
| "txt" => "text/plain", | |
| "vcard" => "text/vcard", | |
| "vrd" => "application/octet-stream", | |
| "vsd" => "application/x-visio", | |
| "wav" => "audio/wav", | |
| "wave" => "audio/wav", | |
| "wdp" => "image/vnd.ms-photo", | |
| "webm" => "video/webm", | |
| "webp" => "image/webp", | |
| "wma" => "audio/x-ms-wma", | |
| "wmf" => "application/x-wmf", | |
| "wmv" => "video/x-ms-wmv", | |
| "wtv" => "video/x-ms-wtv", | |
| "x3f" => "image/x-sigma-x3f", | |
| "xcf" => "image/x-xcf", | |
| "xla" => "application/vnd.ms-excel", | |
| "xlam" => "application/vnd.ms-excel.addin.macroEnabled", | |
| "xls" => "application/vnd.ms-excel", | |
| "xlsb" => "application/vnd.ms-excel.sheet.binary.macroEnabled", | |
| "xlsm" => "application/vnd.ms-excel.sheet.macroEnabled", | |
| "xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | |
| "xlt" => "application/vnd.ms-excel", | |
| "xltm" => "application/vnd.ms-excel.template.macroEnabled", | |
| "xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", | |
| "xml" => "application/xml", | |
| "xmp" => "application/rdf+xml", | |
| "zip" => "application/zip" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment