diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 522d542e43..1d0bc12121 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -517,7 +517,7 @@ public function putFile($fileId, $content = fopen('php://input', 'rb'); - $freespace = $file->getParent()->getFreeSpace(); + $freespace = (int)$file->getStorage()->free_space($file->getInternalPath()); $contentLength = (int)$this->request->getHeader('Content-Length'); try {