From a20487907bd1922ade6b9533745c70d468ca193e Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Fri, 12 Jun 2015 18:50:21 +0200 Subject: 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 --- apps/files_sharing/js/public.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_sharing') 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); }; -- cgit v1.2.3