// display actions
this.fileActions.display(filenameTd, !options.silent, this);
- if (mime !== 'httpd/unix-directory') {
+ if (mime !== 'httpd/unix-directory' && fileData.hasPreview !== false) {
var iconDiv = filenameTd.find('.thumbnail');
// lazy load / newly inserted td ?
// the typeof check ensures that the default value of animate is true
baseUrl: this._baseUrl,
xmlNamespaces: {
'DAV:': 'd',
- 'http://owncloud.org/ns': 'oc'
+ 'http://owncloud.org/ns': 'oc',
+ 'http://nextcloud.org/ns': 'nc'
}
};
if (options.userName) {
};
Client.NS_OWNCLOUD = 'http://owncloud.org/ns';
+ Client.NS_NEXTCLOUD = 'http://nextcloud.org/ns';
Client.NS_DAV = 'DAV:';
Client._PROPFIND_PROPERTIES = [
/**
/**
* File sizes
*/
- [Client.NS_DAV, 'getcontentlength']
+ [Client.NS_DAV, 'getcontentlength'],
+ /**
+ * Preview availability
+ */
+ [Client.NS_NEXTCLOUD, 'has-preview']
];
/**
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;