From 7fa9d4dc1b562f002fce8ff219b0907eff453b6e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 9 Feb 2022 19:57:12 -0700 Subject: [PATCH] Update AvatarController, fix store bug --- app/Http/Controllers/Api/BaseApiController.php | 2 +- app/Http/Controllers/AvatarController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index dd455fda5..ce78c74e6 100644 --- a/app/Http/Controllers/Api/BaseApiController.php +++ b/app/Http/Controllers/Api/BaseApiController.php @@ -183,7 +183,7 @@ class BaseApiController extends Controller { abort_if(!$request->user(), 403); $this->validate($request, [ - 'upload' => 'required|mimetypes:jpeg,png,gif|max:'.config('pixelfed.max_avatar_size'), + 'upload' => 'required|mimetypes:image/jpeg,image/jpg,image/png|max:'.config('pixelfed.max_avatar_size'), ]); try { diff --git a/app/Http/Controllers/AvatarController.php b/app/Http/Controllers/AvatarController.php index bb95c1eda..ea5f84783 100644 --- a/app/Http/Controllers/AvatarController.php +++ b/app/Http/Controllers/AvatarController.php @@ -19,7 +19,7 @@ class AvatarController extends Controller public function store(Request $request) { $this->validate($request, [ - 'avatar' => 'required|mimetypes:jpeg,png|max:'.config('pixelfed.max_avatar_size'), + 'avatar' => 'required|mimetypes:image/jpeg,image/jpg,image/png|max:'.config('pixelfed.max_avatar_size'), ]); try {