diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-28 11:22:34 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-28 14:14:55 +0100 |
commit | e62ca4ea4fc235d7ec767034a80889b2fa331e97 (patch) | |
tree | 545a37abaf90d57cccbb99fcf660331372a9ffc4 /apps/files/js/file-upload.js | |
parent | c61d328ab9696a620b623fb2dfd1622eb0363dc4 (diff) | |
download | nextcloud-server-e62ca4ea4fc235d7ec767034a80889b2fa331e97.tar.gz nextcloud-server-e62ca4ea4fc235d7ec767034a80889b2fa331e97.zip |
Append file etag to preview URLs
Fixes #5534
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r-- | apps/files/js/file-upload.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 5bf4f5c0981..af67a0e2002 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -566,11 +566,12 @@ $(document).ready(function() { tr.attr('data-size', result.data.size); tr.attr('data-mime', result.data.mime); tr.attr('data-id', result.data.id); + tr.attr('data-etag', result.data.etag); tr.find('.filesize').text(humanFileSize(result.data.size)); var path = getPathForPreview(name); - lazyLoadPreview(path, result.data.mime, function(previewpath) { + Files.lazyLoadPreview(path, result.data.mime, function(previewpath) { tr.find('td.filename').attr('style','background-image:url('+previewpath+')'); - }); + }, null, null, result.data.etag); FileActions.display(tr.find('td.filename'), true); } else { OC.dialogs.alert(result.data.message, t('core', 'Could not create file')); @@ -632,9 +633,9 @@ $(document).ready(function() { tr.data('mime', mime).data('id', id); tr.attr('data-id', id); var path = $('#dir').val()+'/'+localName; - lazyLoadPreview(path, mime, function(previewpath) { + Files.lazyLoadPreview(path, mime, function(previewpath) { tr.find('td.filename').attr('style', 'background-image:url('+previewpath+')'); - }); + }, null, null, data.etag); FileActions.display(tr.find('td.filename'), true); }); eventSource.listen('error',function(error) { |