From: Daniel Kesselberg Date: Mon, 17 Jul 2023 12:09:23 +0000 (+0200) Subject: fix: check that object store backend supports multi part uploads X-Git-Tag: v26.0.5rc1~23^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f537c7b5c67d88aecbc012fc19c38be52320a3c7;p=nextcloud-server.git fix: check that object store backend supports multi part uploads Signed-off-by: Daniel Kesselberg --- diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index 6b660fb7c6f..d3673c6bde7 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -278,6 +278,9 @@ class ChunkingV2Plugin extends ServerPlugin { if (!$this->uploadFolder->getStorage()->instanceOfStorage(IChunkedFileWrite::class)) { throw new StorageInvalidException('Storage does not support chunked file writing'); } + if ($this->uploadFolder->getStorage()->instanceOfStorage(ObjectStoreStorage::class) && !$this->uploadFolder->getStorage()->getObjectStore() instanceof IObjectStoreMultiPartUpload) { + throw new StorageInvalidException('Storage does not support multi part uploads'); + } if ($checkUploadMetadata) { if ($this->uploadId === null || $this->uploadPath === null) {