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:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-07-15 15:58:03 +0300
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-07-15 15:58:03 +0300
commit96b252195b421a6bb1c5643dbd15a958d0317295 (patch)
tree578eb7f24a4377bf9f6856f4f5050d3398998254 /apps
parentad6a32126686b9282aa7bb44a3555c03e5137732 (diff)
parent62fa899fd20ef1cccf8c73e39db8c683d7d0ac54 (diff)
Merge pull request #17340 from owncloud/stable8-backport-16911
[stable8] Determine the size we need before asking for a thumbnail
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index bec43a4fb57..c2dd6d3ed38 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -88,8 +88,8 @@ OCA.Sharing.PublicApp = {
// dynamically load image previews
var params = {
- x: $(document).width() * window.devicePixelRatio,
- y: $(document).height() * window.devicePixelRatio,
+ x: Math.floor($(document).width() * window.devicePixelRatio),
+ y: Math.floor($(document).height() * window.devicePixelRatio),
a: 'true',
file: encodeURIComponent(this.initialDir + $('#filename').val()),
t: $('#sharingToken').val(),
@@ -147,6 +147,8 @@ OCA.Sharing.PublicApp = {
this.fileList.generatePreviewUrl = function (urlSpec) {
urlSpec.t = $('#dirToken').val();
+ urlSpec.y = Math.floor(36 * window.devicePixelRatio);
+ urlSpec.x = Math.floor(36 * window.devicePixelRatio);
return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec);
};