summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/connector/sabre/file.php')
-rw-r--r--lib/private/connector/sabre/file.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 54eea54552f..cb03f30e023 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -226,6 +226,19 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
return \OC_Helper::getSecureMimeType($mimeType);
}
+ public function getDirectDownload() {
+ if (\OCP\App::isEnabled('encryption')) {
+ return [];
+ }
+ /** @var \OCP\Files\Storage $storage */
+ list($storage, $internalPath) = $this->fileView->resolvePath($this->path);
+ if (is_null($storage)) {
+ return [];
+ }
+
+ return $storage->getDirectDownload($internalPath);
+ }
+
/**
* @param resource $data
* @return null|string