From 5d4a880437b53344f52f1a7f172739e9c16bad60 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 17 Jul 2023 14:09:23 +0200 Subject: 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(+) (limited to 'apps') 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) { -- cgit v1.2.3