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:
authorOlivier Paroz <github@oparoz.com>2015-06-12 19:50:21 +0300
committerMorris Jobke <hey@morrisjobke.de>2015-07-02 14:25:12 +0300
commita20487907bd1922ade6b9533745c70d468ca193e (patch)
treee57a90bd5b27451311b5e0ae787b04f750900a1c /apps
parent78dc8ca702903b07dbc02746bebcb96169558610 (diff)
Determine the size we need before asking for a thumbnail
We need to set the size of the preview using the devicePixelRatio and use that as arguments when using the preview endpoint or that endpoint will use the default 36x36 and thumbnails will be blurry on high DPI devices
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index bec43a4fb57..19f31aa7104 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -147,6 +147,8 @@ OCA.Sharing.PublicApp = {
this.fileList.generatePreviewUrl = function (urlSpec) {
urlSpec.t = $('#dirToken').val();
+ urlSpec.y = 36 * window.devicePixelRatio;
+ urlSpec.x = 36 * window.devicePixelRatio;
return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec);
};