summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/filesplugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/connector/sabre/filesplugin.php')
-rw-r--r--lib/private/connector/sabre/filesplugin.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index 37798d8b162..b011a050a5c 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -39,6 +39,7 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
$server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}id';
$server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}permissions';
$server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}size';
+ $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}dDU';
$this->server = $server;
$this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
@@ -80,6 +81,15 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
}
}
+ if ($node instanceof OC_Connector_Sabre_File) {
+ /** @var $node OC_Connector_Sabre_File */
+ $directDownloadUrl = $node->getDirectDownload();
+ if (isset($directDownloadUrl['url'])) {
+ $directDownloadUrlPropertyName = '{' . self::NS_OWNCLOUD . '}dDU';
+ $returnedProperties[200][$directDownloadUrlPropertyName] = $directDownloadUrl['url'];
+ }
+ }
+
if ($node instanceof OC_Connector_Sabre_Directory) {
$sizePropertyName = '{' . self::NS_OWNCLOUD . '}size';