From d0cd22f5b426003167648a9eb2f369f9fee537d7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 23 Sep 2018 17:08:17 -0600 Subject: [PATCH] Update StatusController --- app/Http/Controllers/StatusController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index a86209c3e..04c42747e 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -85,7 +85,13 @@ class StatusController extends Controller } $this->validate($request, [ - 'photo.*' => 'required|mimes:jpeg,png,gif|max:'.config('pixelfed.max_photo_size'), + 'photo.*' => function() { + return [ + 'required', + 'mimes:' . config('pixelfed.media_types'), + 'max:' . config('pixelfed.max_photo_size'), + ]; + }, 'caption' => 'string|max:'.config('pixelfed.max_caption_length'), 'cw' => 'nullable|string', 'filter_class' => 'nullable|string',