aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-02 17:50:34 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-02 17:50:34 +0200
commitff89824135298aa072c56f5a811f453df7ac3fe4 (patch)
tree43fa2941d995a6175c4918324cd0e91c775bf84f /core
parentfee8486b7f50422958909abe9fa1305039ecbbab (diff)
parentc80dd82fe4c197cb09344a2ce25f790cd597b792 (diff)
downloadnextcloud-server-ff89824135298aa072c56f5a811f453df7ac3fe4.tar.gz
nextcloud-server-ff89824135298aa072c56f5a811f453df7ac3fe4.zip
Merge pull request #19272 from owncloud/mimetypes-enhanced
Introduce a few new mimetypes for code, fix recursive mimetype aliases
Diffstat (limited to 'core')
-rw-r--r--core/js/mimetype.js2
-rw-r--r--core/js/mimetypelist.js57
2 files changed, 35 insertions, 24 deletions
diff --git a/core/js/mimetype.js b/core/js/mimetype.js
index d22b0a2378a..b0de8eb8411 100644
--- a/core/js/mimetype.js
+++ b/core/js/mimetype.js
@@ -70,7 +70,7 @@ OC.MimeType = {
return undefined;
}
- if (mimeType in OC.MimeTypeList.aliases) {
+ while (mimeType in OC.MimeTypeList.aliases) {
mimeType = OC.MimeTypeList.aliases[mimeType];
}
if (mimeType in OC.MimeType._mimeTypeIcons) {
diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js
index af2ad73c51b..43f01273f55 100644
--- a/core/js/mimetypelist.js
+++ b/core/js/mimetypelist.js
@@ -9,23 +9,26 @@
OC.MimeTypeList={
aliases: {
"application/coreldraw": "image",
- "application/font-sfnt": "font",
- "application/font-woff": "font",
- "application/illustrator": "image/vector",
+ "application/epub+zip": "text",
+ "application/font-sfnt": "image",
+ "application/font-woff": "image",
+ "application/illustrator": "image",
+ "application/javascript": "text/code",
"application/json": "text/code",
- "application/msaccess": "database",
+ "application/msaccess": "file",
"application/msexcel": "x-office/spreadsheet",
"application/mspowerpoint": "x-office/presentation",
"application/msword": "x-office/document",
"application/octet-stream": "file",
- "application/postscript": "image/vector",
+ "application/postscript": "image",
+ "application/rss+xml": "application/xml",
"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-fontobject": "image",
"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",
@@ -49,10 +52,11 @@ OC.MimeTypeList={
"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-cbr": "text",
"application/x-compressed": "package/x-generic",
"application/x-dcraw": "image",
"application/x-deb": "package/x-generic",
- "application/x-font": "font",
+ "application/x-font": "image",
"application/x-gimp": "image",
"application/x-gzip": "package/x-generic",
"application/x-perl": "text/code",
@@ -64,33 +68,40 @@ OC.MimeTypeList={
"application/xml": "text/html",
"application/yaml": "text/code",
"application/zip": "package/x-generic",
+ "database": "file",
"httpd/unix-directory": "dir",
- "image/svg+xml": "image/vector",
"text/css": "text/code",
"text/csv": "x-office/spreadsheet",
- "text/x-shellscript": "text/code"
+ "text/html": "text/code",
+ "text/x-c": "text/code",
+ "text/x-c++src": "text/code",
+ "text/x-h": "text/code",
+ "text/x-java-source": "text/code",
+ "text/x-python": "text/code",
+ "text/x-shellscript": "text/code",
+ "web": "text/code"
},
files: [
- "application-pdf",
- "application",
- "audio",
- "file",
+ "video",
"folder-drag-accept",
- "folder-external",
- "folder-public",
- "folder-shared",
"folder-starred",
- "folder",
- "image",
+ "folder-public",
"package-x-generic",
- "text-calendar",
- "text-code",
- "text-vcard",
"text",
- "video",
+ "folder-external",
+ "text-vcard",
+ "application",
+ "text-code",
+ "x-office-spreadsheet",
+ "application-pdf",
+ "folder",
"x-office-document",
+ "text-calendar",
"x-office-presentation",
- "x-office-spreadsheet"
+ "file",
+ "folder-shared",
+ "image",
+ "audio"
],
themes: []
};