From 0210f8f1e1adbf5df85a59312156c269bff85f08 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Wed, 29 Mar 2023 11:51:01 +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 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',