diff options
author | Olivier Paroz <github@oparoz.com> | 2015-06-12 19:50:21 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-02 14:25:12 +0300 |
commit | a20487907bd1922ade6b9533745c70d468ca193e (patch) | |
tree | e57a90bd5b27451311b5e0ae787b04f750900a1c /apps | |
parent | 78dc8ca702903b07dbc02746bebcb96169558610 (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.js | 2 |
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); }; |