Fixed validation
This commit is contained in:
parent
5e8c7eb3d3
commit
9ff0790d44
1 changed files with 1 additions and 1 deletions
|
@ -439,7 +439,7 @@ App::post('/v1/functions/:functionId/tags')
|
|||
$file['tmp_name'] = (\is_array($file['tmp_name']) && isset($file['tmp_name'][0])) ? $file['tmp_name'][0] : $file['tmp_name'];
|
||||
$file['size'] = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size'];
|
||||
|
||||
if (!$$fileExt->isValid($file['tmp_name'])) { // Check if file type is allowed
|
||||
if (!$fileExt->isValid($file['name'])) { // Check if file type is allowed
|
||||
throw new Exception('File type not allowed', 400);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue