From f537c7b5c67d88aecbc012fc19c38be52320a3c7 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 17 Jul 2023 14:09:23 +0200 Subject: [PATCH] fix: check that object store backend supports multi part uploads Signed-off-by: Daniel Kesselberg --- apps/dav/lib/Upload/ChunkingV2Plugin.php | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.5