summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-16 12:13:16 +0200
committerLukas Reschke <lukas@owncloud.com>2014-10-16 12:35:51 +0200
commit9cfbf7ed1c92b262984488eaa9cee5df88419d5b (patch)
tree6f8368b3971813a7383b519e560854f7f2afa2e1 /apps/files_sharing/js
parent756f64d728ccb9ef9bc6ba2ca965064827003231 (diff)
downloadnextcloud-server-9cfbf7ed1c92b262984488eaa9cee5df88419d5b.tar.gz
nextcloud-server-9cfbf7ed1c92b262984488eaa9cee5df88419d5b.zip
Fix SVG icons
FIXME: Ugly hack to prevent SVG of being returned if the SVG provider is not enabled. This is required because the preview system is designed in a bad way and relies on opt-in with asterisks (i.e. image/*) which will lead to the fact that a SVG will also match the image provider. Conflicts: lib/private/preview.php
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/public.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index b3036254401..c4b5508692e 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -85,7 +85,7 @@ OCA.Sharing.PublicApp = {
};
var img = $('<img class="publicpreview">');
- if (previewSupported === 'true' || mimetype.substr(0, mimetype.indexOf('/')) === 'image') {
+ if (previewSupported === 'true' || mimetype.substr(0, mimetype.indexOf('/')) === 'image' && mimetype !== 'image/svg+xml') {
img.attr('src', OC.filePath('files_sharing', 'ajax', 'publicpreview.php') + '?' + OC.buildQueryString(params));
img.appendTo('#imgframe');
} else if (mimetype.substr(0, mimetype.indexOf('/')) !== 'video') {