Skip to content

Commit

Permalink
allow saving when no quota is set
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <[email protected]>
  • Loading branch information
grnd-alt committed Apr 11, 2024
1 parent b1ef0b3 commit b9dc420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ public function putFile($fileId,
$content = fopen('php://input', 'rb');

$freespace = $file->getParent()->getFreeSpace();
$contentLength = $this->request->getHeader('CONTENT_LENGTH');
$contentLength = (int)$this->request->getHeader('Content-Length');

try {
if ($contentLength > $freespace) {
if ($freespace >= 0 && $contentLength > $freespace) {
throw new \Exception('Not enough storage');
}
$this->wrappedFilesystemOperation($wopi, function () use ($file, $content) {
Expand Down

0 comments on commit b9dc420

Please sign in to comment.