From 5b326c8998c5f8bb3233147cd3cc3f8d8631a1fd Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Wed, 29 Mar 2023 09:55:36 +0200 Subject: [PATCH] no message --- be/app/Http/Controllers/SubTaskController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/app/Http/Controllers/SubTaskController.php b/be/app/Http/Controllers/SubTaskController.php index 8c0e142..82e4d69 100644 --- a/be/app/Http/Controllers/SubTaskController.php +++ b/be/app/Http/Controllers/SubTaskController.php @@ -144,8 +144,8 @@ class SubTaskController extends Controller } // validacia na max 50MB size pre attachmenty. neslo dat do klasickeho laravel validation, tak je to separe - if ($files = $request->file('data')['files']) { - foreach ( $files as $file ) { + if ($files = $request->file('data')) { + foreach ( $files['files'] as $file ) { if ($file->getSize() > 52428800) return response()->json([ 'files' => 'File size must be less than 50MB',