diff options
author | Olivier Paroz <github@oparoz.com> | 2015-06-12 18:50:21 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-06-12 18:50:21 +0200 |
commit | 8ff4a66f0150624b8b08c4c47765016bd2e3a2ab (patch) | |
tree | 8eaf8da7a613509180cc4b533b207da70eee40b4 | |
parent | 446f628136532fe556757c3fe39655c6304e3cb9 (diff) | |
download | nextcloud-server-8ff4a66f0150624b8b08c4c47765016bd2e3a2ab.tar.gz nextcloud-server-8ff4a66f0150624b8b08c4c47765016bd2e3a2ab.zip |
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
-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 6261c70626d..32a469414d6 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -159,6 +159,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); }; |