Summer Sale! All accounts are 50% off this week.

OzzyBoy's avatar

Laravel Dropzone.Js TokenMismatchException for Large Files

i have a Laravel application and a form with dropzone. Normally , it works well. But when i try to upload large files ( 50M - 60 M), i get this error TokenMismatchException.

i'am using this code to send token :

formData.append("_token", $('[name=_token]').val());

i also changed all php.ini settings max_upload_size , set_time_limit(0); , memory_limit , post_max_size , max_input_time

Note: it's working for small files.

Thank you !

0 likes
2 replies
kocoten1992's avatar

It's php or server problem, if you change post_max_size and upload_max_size already then I might guess you are using nginx?

If that the case, you might want edit /etc/nginx/sites-available/default:

http {
        client_max_body_size 100m;
}

Please or to participate in this conversation.