From c6060f53cd370dec1960a6bbf14a5788b75467d4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 28 Aug 2015 20:14:48 +0200 Subject: allow handling thumbnail errors --- apps/files/js/mainfileinfodetailview.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files/js/mainfileinfodetailview.js') diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index f647a0de2a9..e33c0edb1d6 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -132,7 +132,10 @@ y: 75, callback: function(previewUrl) { $iconDiv.css('background-image', 'url("' + previewUrl + '")'); - } + }, + error: function() { + this.$el.find('.thumbnailContainer').removeClass('image'); //fall back to regular view + }.bind(this) }); } else { // TODO: special icons / shared / external -- cgit v1.2.3