diff --git a/be/app/Http/Controllers/SubTaskController.php b/be/app/Http/Controllers/SubTaskController.php index 82e4d69..db3286c 100644 --- a/be/app/Http/Controllers/SubTaskController.php +++ b/be/app/Http/Controllers/SubTaskController.php @@ -208,8 +208,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',