diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 766f50aa3a..3e629bf76b 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -893,7 +893,6 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId/download') } if ($size > APP_STORAGE_READ_BUFFER) { - $response->addHeader('Content-Length', $deviceFunctions->getFileSize($path)); for ($i = 0; $i < ceil($size / MAX_OUTPUT_CHUNK_SIZE); $i++) { $response->chunk( $deviceFunctions->read( diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index dc181d2038..b80df5499e 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1108,7 +1108,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') } if ($size > APP_STORAGE_READ_BUFFER) { - $response->addHeader('Content-Length', $deviceFiles->getFileSize($path)); for ($i = 0; $i < ceil($size / MAX_OUTPUT_CHUNK_SIZE); $i++) { $response->chunk( $deviceFiles->read( @@ -1261,7 +1260,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') $size = $deviceFiles->getFileSize($path); if ($size > APP_STORAGE_READ_BUFFER) { - $response->addHeader('Content-Length', $deviceFiles->getFileSize($path)); for ($i = 0; $i < ceil($size / MAX_OUTPUT_CHUNK_SIZE); $i++) { $response->chunk( $deviceFiles->read(