summaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileinfomodel.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-08-28 17:51:26 +0200
committerRobin Appelman <icewind@owncloud.com>2015-09-02 10:32:43 +0200
commite85620ab69a0a6ef5cec5bd1e6d753e08379c43d (patch)
tree429a71da833c6568d9970deddfde37fc246ef366 /apps/files/js/fileinfomodel.js
parentc6060f53cd370dec1960a6bbf14a5788b75467d4 (diff)
downloadnextcloud-server-e85620ab69a0a6ef5cec5bd1e6d753e08379c43d.tar.gz
nextcloud-server-e85620ab69a0a6ef5cec5bd1e6d753e08379c43d.zip
larger preview for images in the sidebar
Diffstat (limited to 'apps/files/js/fileinfomodel.js')
-rw-r--r--apps/files/js/fileinfomodel.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files/js/fileinfomodel.js b/apps/files/js/fileinfomodel.js
index 05060854fba..1c850239cdc 100644
--- a/apps/files/js/fileinfomodel.js
+++ b/apps/files/js/fileinfomodel.js
@@ -53,6 +53,15 @@
},
/**
+ * Returns whether this file is an image
+ *
+ * @return {boolean} true if this is an image, false otherwise
+ */
+ isImage: function() {
+ return this.get('mimetype').substr(0, 6) === 'image/';
+ },
+
+ /**
* Returns the full path to this file
*
* @return {string} full path