I can upload the files if they are fitting this validation rule
'user_file' => 'file|max:10240|mimes:xls,xlsx,doc,docx,pdf,zip'
all goes fine.
I have set my upload_max_filesize to 32MB and post_max_size to 40MB in php.ini
but if i try to upload a file bigger than 40MB my validation rules don't even trigger. I get TokenMismatchException error....
If someone can verify this by simply trying to upload some very big file (a video file for example)
When You exceed post payload size - everything is dropped, so csrf_token does not come to laravel and the upload file is empty so it cannot be validated.
UPDATE
To fix this you need to check the file size before the uploading with javascript or jquery
here is an example:
How to check file input size with jQuery?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With