diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-08-02 13:42:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:42:57 +0200 |
commit | 454c61fdd284c8d31ebd8e9d25b1d44bf180d2ed (patch) | |
tree | 2713849f3ff2e584ae8957d62e5bec441394dcc7 | |
parent | 78856f354f63d3c23920fc3eeb386d6e92d6215d (diff) | |
parent | 2124fb9ff25529b069dee4ca946969252ab5ef8a (diff) | |
download | nextcloud-server-454c61fdd284c8d31ebd8e9d25b1d44bf180d2ed.tar.gz nextcloud-server-454c61fdd284c8d31ebd8e9d25b1d44bf180d2ed.zip |
Merge pull request #39672 from nextcloud/fix/s3-chunk-upload-quota
fix(dav): use quota of destination in s3 chunk upload
-rw-r--r-- | apps/dav/lib/Upload/ChunkingV2Plugin.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index d3673c6bde7..97ae51fbe38 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -168,7 +168,7 @@ class ChunkingV2Plugin extends ServerPlugin { [$destinationDir, $destinationName] = Uri\split($this->uploadPath); /** @var Directory $destinationParent */ $destinationParent = $this->server->tree->getNodeForPath($destinationDir); - $free = $storage->free_space($destinationParent->getInternalPath()); + $free = $destinationParent->getNode()->getFreeSpace(); $newSize = $tempTargetFile->getSize() + $additionalSize; if ($free >= 0 && ($tempTargetFile->getSize() > $free || $newSize > $free)) { throw new InsufficientStorage("Insufficient space in $this->uploadPath"); @@ -225,7 +225,7 @@ class ChunkingV2Plugin extends ServerPlugin { foreach ($parts as $part) { $size += $part['Size']; } - $free = $storage->free_space($destinationParent->getInternalPath()); + $free = $destinationParent->getNode()->getFreeSpace(); if ($free >= 0 && ($size > $free)) { throw new InsufficientStorage("Insufficient space in $this->uploadPath"); } |