diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 391d42393f..1f878df156 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -510,9 +510,9 @@ class File extends Node implements IFile { */ private function needsPartFile($storage) { // TODO: in the future use ChunkHandler provided by storage - // and/or add method on Storage called "needsPartFile()" return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') && - !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud'); + !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud') && + $storage->needsPartFile(); } /** diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 6e5799be34..5a57532f71 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -795,4 +795,11 @@ abstract class Common implements Storage, ILockingStorage { public function setAvailability($isAvailable) { $this->getStorageCache()->setAvailability($isAvailable); } + + /** + * @return bool + */ + public function needsPartFile() { + return true; + } } diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index 71b64d8c82..d7cd4b729d 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -610,4 +610,11 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage { $this->getWrapperStorage()->changeLock($path, $type, $provider); } } + + /** + * @return bool + */ + public function needsPartFile() { + return $this->getWrapperStorage()->needsPartFile(); + } } diff --git a/lib/public/Files/Storage.php b/lib/public/Files/Storage.php index 1532c84b62..213bbc0e54 100644 --- a/lib/public/Files/Storage.php +++ b/lib/public/Files/Storage.php @@ -458,4 +458,6 @@ interface Storage extends IStorage { * @param bool $isAvailable */ public function setAvailability($isAvailable); + + public function needsPartFile(); }