CSRF issue with AJAX upload

Hello

I’m using dropzone extension in my form to upload multiple files using ajax. It’s located on the same host with upload action that’s used to handle the files.

But when file is have to be uploaded I get an error “Unable to verify your data submission”. The only way is to turn off CSRF for this action, but I don’t like it much since it’s the same host.

Dropzone’s widget is placed inside ActiveForm, so I don’t see any reason for it to do not work right.