diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 3cafee4c9..1dcb9d106 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -477,7 +477,7 @@ App::post('/v1/functions/:functionId/tags') } else { // Calculate total number of chunks based on the chunk size i.e ($rangeEnd - $rangeStart) $chunks = (int) ceil($size / ($end + 1 - $start)); - $chunk = (int) ($start / ($end + 1 - $start)); + $chunk = (int) ($start / ($end + 1 - $start)) + 1; } }