summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Upload/ChunkingV2Plugin.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php
index cb7c802125c..6b660fb7c6f 100644
--- a/apps/dav/lib/Upload/ChunkingV2Plugin.php
+++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php
@@ -255,17 +255,15 @@ class ChunkingV2Plugin extends ServerPlugin {
public function beforeDelete(RequestInterface $request, ResponseInterface $response) {
try {
- $this->prepareUpload($request->getPath());
- if (!$this->uploadFolder instanceof UploadFolder) {
- return true;
- }
-
- [$storage, $storagePath] = $this->getUploadStorage($this->uploadPath);
- $storage->cancelChunkedWrite($storagePath, $this->uploadId);
- return true;
- } catch (NotFound $e) {
+ $this->prepareUpload(dirname($request->getPath()));
+ $this->checkPrerequisites();
+ } catch (StorageInvalidException|BadRequest|NotFound $e) {
return true;
}
+
+ [$storage, $storagePath] = $this->getUploadStorage($this->uploadPath);
+ $storage->cancelChunkedWrite($storagePath, $this->uploadId);
+ return true;
}
/**