-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Less calls to the server in mimetype.js
Now we just load 1 big list of aliases and the mimetype icons we have. This avoids lookups for each mime type. And speeds things up!
- Loading branch information
Showing
2 changed files
with
128 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"aliases": { | ||
"application/coreldraw": "image", | ||
"application/font-sfnt": "font", | ||
"application/font-woff": "font", | ||
"application/illustrator": "image/vector", | ||
"application/json": "text/code", | ||
"application/msaccess": "database", | ||
"application/msexcel": "x-office/spreadsheet", | ||
"application/mspowerpoint": "x-office/presentation", | ||
"application/msword": "x-office/document", | ||
"application/octet-stream": "file", | ||
"application/postscript": "image/vector", | ||
"application/vnd.android.package-archive": "package/x-generic", | ||
"application/vnd.ms-excel": "x-office/spreadsheet", | ||
"application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet", | ||
"application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet", | ||
"application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet", | ||
"application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet", | ||
"application/vnd.ms-fontobject": "font", | ||
"application/vnd.ms-powerpoint": "x-office/presentation", | ||
"application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation", | ||
"application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation", | ||
"application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation", | ||
"application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation", | ||
"application/vnd.ms-word.document.macroEnabled.12": "x-office/document", | ||
"application/vnd.ms-word.template.macroEnabled.12": "x-office/document", | ||
"application/vnd.oasis.opendocument.presentation": "x-office/presentation", | ||
"application/vnd.oasis.opendocument.presentation-template": "x-office/presentation", | ||
"application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet", | ||
"application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet", | ||
"application/vnd.oasis.opendocument.text": "x-office/document", | ||
"application/vnd.oasis.opendocument.text-master": "x-office/document", | ||
"application/vnd.oasis.opendocument.text-template": "x-office/document", | ||
"application/vnd.oasis.opendocument.text-web": "x-office/document", | ||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation", | ||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation", | ||
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation", | ||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet", | ||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet", | ||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document", | ||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document", | ||
"application/x-7z-compressed": "package/x-generic", | ||
"application/x-compressed": "package/x-generic", | ||
"application/x-dcraw": "image", | ||
"application/x-deb": "package/x-generic", | ||
"application/x-font": "font", | ||
"application/x-gimp": "image", | ||
"application/x-gzip": "package/x-generic", | ||
"application/x-perl": "text/code", | ||
"application/x-photoshop": "image", | ||
"application/x-php": "text/code", | ||
"application/x-rar-compressed": "package/x-generic", | ||
"application/x-tar": "package/x-generic", | ||
"application/x-tex": "text", | ||
"application/xml": "text/html", | ||
"application/yaml": "text/code", | ||
"application/zip": "package/x-generic", | ||
"image/svg+xml": "image/vector", | ||
"text/css": "text/code", | ||
"text/csv": "x-office/spreadsheet", | ||
"text/x-shellscript": "text/code" | ||
}, | ||
"files": [ | ||
"application", | ||
"application-epub+zip", | ||
"application-javascript", | ||
"application-pdf", | ||
"application-rss+xml", | ||
"application-x-cbr", | ||
"application-x-shockwave-flash", | ||
"audio", | ||
"database", | ||
"file", | ||
"folder", | ||
"folder-drag-accept", | ||
"folder-external", | ||
"folder-public", | ||
"folder-shared", | ||
"font", | ||
"image", | ||
"image-vector", | ||
"package-x-generic", | ||
"text", | ||
"text-calendar", | ||
"text-code", | ||
"text-html", | ||
"text-vcard", | ||
"text-x-c", | ||
"text-x-h", | ||
"text-x-python", | ||
"video", | ||
"web", | ||
"x-office-document", | ||
"x-office-presentation", | ||
"x-office-spreadsheet" | ||
] | ||
} | ||
This comment has been minimized.
Sorry, something went wrong. |
newline