summaryrefslogtreecommitdiffstats
path: root/core/js/oc-dialogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r--core/js/oc-dialogs.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 0692a9df5ca..b1ad72d9206 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -381,9 +381,15 @@ var OCdialogs = {
$replacementDiv.find('.mtime').text(formatDate(replacement.lastModifiedDate));
}
var path = original.directory + '/' +original.name;
- Files.lazyLoadPreview(path, original.mimetype, function(previewpath){
- $originalDiv.find('.icon').css('background-image','url('+previewpath+')');
- }, 96, 96, original.etag);
+ var urlSpec = {
+ file: path,
+ x: 96,
+ y: 96,
+ c: original.etag,
+ forceIcon: 0
+ };
+ var previewpath = OC.generateUrl('/core/preview.png?') + $.param(urlSpec);
+ $originalDiv.find('.icon').css('background-image','url('+previewpath+')');
getCroppedPreview(replacement).then(
function(path){
$replacementDiv.find('.icon').css('background-image','url(' + path + ')');