Disallow svg images to be erroneously uploaded

Laravel's `image` validation rule allows svg files to pass validation, but we can't handle svgs so it would result in an unspecified 500 error which isn't nice.
This commit is contained in:
Toby Zerner 2016-08-27 23:54:18 +09:30
parent d5797dae79
commit 0d99f75a6d

View File

@ -15,7 +15,7 @@ class AvatarValidator extends AbstractValidator
protected $rules = [ protected $rules = [
'avatar' => [ 'avatar' => [
'required', 'required',
'image', 'mimes:jpeg,png,bmp,gif',
'max:2048' 'max:2048'
] ]
]; ];