Use this validation string:
$validator = Validator::make($request->all(), [
'image' => 'required|mimes:jpeg,png,jpg,gif,pdf,tiff,svg,ai,psd'
]);
Then attempt to upload/validate these two files:


The first one passes validation, the second one fails.
Check your php.ini 'upload_max_size' and 'post_max_size'. I think the 'upload_max_size' may default to 2M. The second photo is bigger than that. See this post on Laracasts. However, if it is actually the Laravel validation that is catching it....then maybe that's not the problem.
Oh wow, good catch. I had actually checked that, but your post made me
revisit this and I realized our development server did not have the same
50MB limit that our production webserver has. Thanks for pointing this out!
On Tue, Mar 28, 2017 at 10:49 AM, Clayton Stone notifications@github.com
wrote:
Check your php.ini 'upload_max_size' and 'post_max_size'. I think the
'upload_max_size' may default to 2M. The second photo is bigger than that.
See this post
https://laracasts.com/discuss/channels/general-discussion/file-validation-failing-on-larger-files?page=1
on Laracasts.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/laravel/framework/issues/18541#issuecomment-289794520,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAqXtE2RnBJtJEbs2BE1HUJPCpswfBpkks5rqR3hgaJpZM4Mrr3w
.
Most helpful comment
Oh wow, good catch. I had actually checked that, but your post made me
revisit this and I realized our development server did not have the same
50MB limit that our production webserver has. Thanks for pointing this out!
On Tue, Mar 28, 2017 at 10:49 AM, Clayton Stone notifications@github.com
wrote: