5 years ago

File validation failing on larger files.

Posted 5 years ago by imJohnBon

I currently have a form with a file upload, and on that file upload I have a validation that makes sure it's an image and also makes sure the size can't be any larger than 1000:

'profile_image' => 'max:1000|mimes:jpg,png,gif',

However, when I upload a file to the form that's really big, the whole page breaks and I get this:

The file "test.psd" exceeds your upload_max_filesize ini directive (limit is 2048 KiB).

But I don't understand, the validation rules I have set should stop it from even getting to this point. Also it's a .PSD! It's not even the correct mime type. But if I upload a smaller .PSD, it validates fine. So the issue seems to be with larger files.

Please sign in or create an account to participate in this conversation.