mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
Merge pull request #38167 from nextcloud/backport/38100/stable26
[stable26] Fix error on delete in ChunkingV2Plugin
This commit is contained in:
commit
83e0b31b62
1 changed files with 7 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue