summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/files/client.js17
-rw-r--r--core/js/files/fileinfo.js7
2 files changed, 21 insertions, 3 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js
index 0bf5a69e19c..a195258afbb 100644
--- a/core/js/files/client.js
+++ b/core/js/files/client.js
@@ -47,7 +47,8 @@
baseUrl: this._baseUrl,
xmlNamespaces: {
'DAV:': 'd',
- 'http://owncloud.org/ns': 'oc'
+ 'http://owncloud.org/ns': 'oc',
+ 'http://nextcloud.org/ns': 'nc'
}
};
if (options.userName) {
@@ -61,6 +62,7 @@
};
Client.NS_OWNCLOUD = 'http://owncloud.org/ns';
+ Client.NS_NEXTCLOUD = 'http://nextcloud.org/ns';
Client.NS_DAV = 'DAV:';
Client._PROPFIND_PROPERTIES = [
/**
@@ -95,7 +97,11 @@
/**
* File sizes
*/
- [Client.NS_DAV, 'getcontentlength']
+ [Client.NS_DAV, 'getcontentlength'],
+ /**
+ * Preview availability
+ */
+ [Client.NS_NEXTCLOUD, 'has-preview']
];
/**
@@ -274,6 +280,13 @@
data.size = parseInt(sizeProp, 10);
}
+ var hasPreviewProp = props['{' + Client.NS_NEXTCLOUD + '}has-preview'];
+ if (!_.isUndefined(hasPreviewProp)) {
+ data.hasPreview = hasPreviewProp === 'true';
+ } else {
+ data.hasPreview = true;
+ }
+
var contentType = props['{' + Client.NS_DAV + '}getcontenttype'];
if (!_.isUndefined(contentType)) {
data.mimetype = contentType;
diff --git a/core/js/files/fileinfo.js b/core/js/files/fileinfo.js
index 3bf68d88b15..1fc239da47a 100644
--- a/core/js/files/fileinfo.js
+++ b/core/js/files/fileinfo.js
@@ -127,7 +127,12 @@
*
* @type string
*/
- mountType: null
+ mountType: null,
+
+ /**
+ * @type boolean
+ */
+ hasPreview: true
};
if (!OC.Files) {