Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-16 14:13:16 +0400
committerLukas Reschke <lukas@owncloud.com>2014-10-16 14:25:58 +0400
commit979d2823b532446d6c5ef24717178f3533fda1c3 (patch)
treedaadc1e9eef14ab8e667306c362d82e39d8d3ef3 /apps
parentbefbf1c15031446130cb1d253aec5f82d0060dd8 (diff)
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.
Diffstat (limited to 'apps')
-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 377be5ab866..c697f43ba76 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -25,7 +25,7 @@ $(document).ready(function() {
};
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') {