summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-07-04 11:10:54 +0200
committerVincent Petry <pvince81@owncloud.com>2014-07-04 11:16:23 +0200
commit5e8959a5b36f8ff150497d818ba09a8828ba5a7b (patch)
treeb6448db70d5d2743fee01275a4269dc4305137c0 /apps/files_sharing/js
parente4a3f8d3c44f3238071d03f793cd2c5395062b5e (diff)
downloadnextcloud-server-5e8959a5b36f8ff150497d818ba09a8828ba5a7b.tar.gz
nextcloud-server-5e8959a5b36f8ff150497d818ba09a8828ba5a7b.zip
Return and use isPreviewAvailable for share previews
Since the mime type is known, now isPreviewAvailable is returned as well and used by the JS side to properly render mime icon and previews.
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/sharedfilelist.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 304f77a8d77..ea9071cfcb8 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -166,11 +166,10 @@
}
else {
file.type = 'file';
- // force preview retrieval as we don't have mime types,
- // the preview endpoint will fall back to the mime type
- // icon if no preview exists
- file.isPreviewAvailable = true;
- file.icon = true;
+ if (share.isPreviewAvailable) {
+ file.icon = true;
+ file.isPreviewAvailable = true;
+ }
}
file.share = {
id: share.id,