diff --git a/CHANGELOG.md b/CHANGELOG.md index a5ab05d6..d24990a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - Updated Exception handler to report validation message bag errors. ([74905ba1](https://github.com/pixelfed/pixelfed/commit/74905ba1)) - Updated ApiV1Controller, add validation messages to update_credentials endpoint. ([cd785601](https://github.com/pixelfed/pixelfed/commit/cd785601)) - Updated ComposeController, improve location search results ordering by use frequency. ([29c4bd25](https://github.com/pixelfed/pixelfed/commit/29c4bd25)) +- Updated AvatarController, fix mimetype bug. ([7fa9d4dc](https://github.com/pixelfed/pixelfed/commit/7fa9d4dc)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2) diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index dd455fda..ce78c74e 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 bb95c1ed..ea5f8478 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 {