From b9dc42094b52a4b401c798e01a37cf2bec21cb62 Mon Sep 17 00:00:00 2001 From: grnd-alt Date: Thu, 11 Apr 2024 09:35:29 +0200 Subject: [PATCH] allow saving when no quota is set Signed-off-by: grnd-alt --- lib/Controller/WopiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index d1d2efded2..7f704eccd0 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -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) {