diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 2d93bc17996..6df19621be6 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -139,7 +139,7 @@ OCA.Sharing.PublicApp = { }).then(function (data) { self._showTextPreview(data, previewHeight); }); - } else if (previewSupported === 'true' || + } else if ((previewSupported === 'true' && mimetype.substr(0, mimetype.indexOf('/')) !== 'video') || mimetype.substr(0, mimetype.indexOf('/')) === 'image' && mimetype !== 'image/svg+xml') { img.attr('src', OC.filePath('files_sharing', 'ajax', 'publicpreview.php') + '?' + OC.buildQueryString(params)); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index cb7fe1103b5..fb29382bdee 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -21,11 +21,13 @@ OCP\Util::addScript('files', 'files'); OCP\Util::addScript('files', 'filelist'); OCP\Util::addscript('files', 'keyboardshortcuts'); -$thumbSize = 1024; +$sysConfig = \OC::$server->getConfig(); +$thumbSizeX = $sysConfig->getSystemValue('preview_max_x', 1024); +$thumbSizeY = $sysConfig->getSystemValue('preview_max_y', 1024); ?> - +
@@ -94,7 +96,7 @@ $thumbSize = 1024;
-