]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: check that object store backend supports multi part uploads 39459/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Mon, 17 Jul 2023 12:09:23 +0000 (14:09 +0200)
committerDaniel <mail@danielkesselberg.de>
Sun, 23 Jul 2023 14:06:55 +0000 (16:06 +0200)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/dav/lib/Upload/ChunkingV2Plugin.php

index 6b660fb7c6f95f9baac5690f7a176a968c2b253a..d3673c6bde77674d5f036d847ef6f99ead905650 100644 (file)
@@ -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) {