summaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileinfomodel.js
diff options
context:
space:
mode:
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