Consistent naming

This commit is contained in:
Khushboo Verma 2025-04-14 14:00:44 +00:00
parent 1acbff316e
commit 81c3d96629
2 changed files with 5 additions and 5 deletions

View file

@ -1312,14 +1312,14 @@ App::post('/v1/functions/:functionId/deployments')
throw new Exception(Exception::STORAGE_FILE_EMPTY, 'No file sent');
}
$functionFileSize = (System::getEnv('_APP_FUNCTIONS_SIZE_LIMIT') ?: 30000000);
$functionSizeLimit = System::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', '30000000');
if (isset($plan['functionSize'])) {
$functionFileSize = $plan['functionSize'] * 1000 * 1000;
$functionSizeLimit = $plan['functionSize'] * 1000 * 1000;
}
$fileExt = new FileExt([FileExt::TYPE_GZIP]);
$fileSizeValidator = new FileSize($functionFileSize);
$fileSizeValidator = new FileSize($functionSizeLimit);
$upload = new Upload();
// Make sure we handle a single file and multiple files the same way

View file

@ -405,9 +405,9 @@ class Builds extends Action
$directorySize = $localDevice->getDirectorySize($tmpDirectory);
$functionsSizeLimit = (int) (System::getEnv('_APP_FUNCTIONS_SIZE_LIMIT') ?: 30000000);
$functionsSizeLimit = (int)System::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', '30000000');
if (!empty($plan['functionSize'])) {
if (isset($plan['functionSize'])) {
$functionsSizeLimit = (int) $plan['functionSize'] * 1000 * 1000;
}