From af7f98a03f948bd8b803ff4db8a74f0ed39fa313 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 7 Dec 2021 14:00:42 +0545 Subject: [PATCH] fix error --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 1e0ba2a906..373810b352 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -609,7 +609,7 @@ App::post('/v1/storage/buckets/:bucketId/files') throw new Exception('Invalid content-range header', 400); } - if ($end === $size) { + if ($end === $fileSize) { //if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to notify it's last chunk $chunks = $chunk = -1; } else {