From 5ea1ab714e446364b16acbdc4e902100843aab8f Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 3 Dec 2021 11:43:41 +0545 Subject: [PATCH] function tags upload chunk begin from 1 --- app/controllers/api/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index b2d7ecc61..2aba77043 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; } } @@ -498,7 +498,7 @@ App::post('/v1/functions/:functionId/tags') if(!$tag->isEmpty()) { $chunks = $tag->getAttribute('chunksTotal', 1); if($chunk == -1) { - $chunk = $chunks - 1; + $chunk = $chunks; } }