1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00
This commit is contained in:
Damodar Lohani 2022-03-04 12:03:10 +05:45 committed by GitHub
parent 57f410cb5f
commit 2096c5c8b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -294,16 +294,12 @@ App::post('/v1/mock/tests/general/upload')
$file['name'] = (\is_array($file['name'])) ? $file['name'][0] : $file['name'];
$file['size'] = (\is_array($file['size'])) ? $file['size'][0] : $file['size'];
foreach ($file['name'] as $i => $name) {
if ($name !== 'file.png') {
throw new Exception('Wrong file name', 400, Exception::GENERAL_MOCK);
}
if ($file['name'] !== 'file.png') {
throw new Exception('Wrong file name', 400, Exception::GENERAL_MOCK);
}
foreach ($file['size'] as $i => $size) {
if ($size !== 38756) {
if ($file['size'] !== 38756) {
throw new Exception('Wrong file size', 400, Exception::GENERAL_MOCK);
}
}
if (\md5(\file_get_contents($file['tmp_name'])) !== 'd80e7e6999a3eb2ae0d631a96fe135a4') {