Fetch quota with files propfind
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
7afe12eccb
commit
e051ef1d68
|
@ -82,6 +82,7 @@ import escapeHTML from 'escape-html'
|
||||||
Client.PROPERTY_GETCONTENTLENGTH = '{' + Client.NS_DAV + '}getcontentlength'
|
Client.PROPERTY_GETCONTENTLENGTH = '{' + Client.NS_DAV + '}getcontentlength'
|
||||||
Client.PROPERTY_ISENCRYPTED = '{' + Client.NS_DAV + '}is-encrypted'
|
Client.PROPERTY_ISENCRYPTED = '{' + Client.NS_DAV + '}is-encrypted'
|
||||||
Client.PROPERTY_SHARE_PERMISSIONS = '{' + Client.NS_OCS + '}share-permissions'
|
Client.PROPERTY_SHARE_PERMISSIONS = '{' + Client.NS_OCS + '}share-permissions'
|
||||||
|
Client.PROPERTY_QUOTA_AVAILABLE_BYTES = '{' + Client.NS_DAV + '}quota-available-bytes'
|
||||||
|
|
||||||
Client.PROTOCOL_HTTP = 'http'
|
Client.PROTOCOL_HTTP = 'http'
|
||||||
Client.PROTOCOL_HTTPS = 'https'
|
Client.PROTOCOL_HTTPS = 'https'
|
||||||
|
@ -120,6 +121,7 @@ import escapeHTML from 'escape-html'
|
||||||
* File sizes
|
* File sizes
|
||||||
*/
|
*/
|
||||||
[Client.NS_DAV, 'getcontentlength'],
|
[Client.NS_DAV, 'getcontentlength'],
|
||||||
|
[Client.NS_DAV, 'quota-available-bytes'],
|
||||||
/**
|
/**
|
||||||
* Preview availability
|
* Preview availability
|
||||||
*/
|
*/
|
||||||
|
@ -397,6 +399,11 @@ import escapeHTML from 'escape-html'
|
||||||
data.mountType = mounTypeProp
|
data.mountType = mounTypeProp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const quotaAvailableBytes = props['{' + Client.NS_DAV + '}quota-available-bytes']
|
||||||
|
if (!_.isUndefined(quotaAvailableBytes)) {
|
||||||
|
data.quotaAvailableBytes = quotaAvailableBytes
|
||||||
|
}
|
||||||
|
|
||||||
// extend the parsed data using the custom parsers
|
// extend the parsed data using the custom parsers
|
||||||
_.each(this._fileInfoParsers, function(parserFunction) {
|
_.each(this._fileInfoParsers, function(parserFunction) {
|
||||||
_.extend(data, parserFunction(response, data) || {})
|
_.extend(data, parserFunction(response, data) || {})
|
||||||
|
|
|
@ -139,6 +139,8 @@
|
||||||
* @type int
|
* @type int
|
||||||
*/
|
*/
|
||||||
sharePermissions: null,
|
sharePermissions: null,
|
||||||
|
|
||||||
|
quotaAvailableBytes: -1,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!OC.Files) {
|
if (!OC.Files) {
|
||||||
|
|
Loading…
Reference in New Issue