fix: check that object store backend supports multi part uploads

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2023-07-17 14:09:23 +02:00 committed by Daniel
parent f52145f775
commit f537c7b5c6

View 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) {