Tuesday, 6 August 2019

Dropzone Processing Queue not working on server side validation

I am using Laravel 5.8 and integrated dropzone in form.In my form i have post title unique validation on server side.

Scenario of problem is

1.user will enter blog post title and add 5 images in dropzone.

2.then if the entered title already exist then it will validation error

3.after the validation error again if we try to submit form then request will not sent to server.It means dzClosure.processQueue(); fails

document.getElementById("submitArticleFormButton").addEventListener("click", function(e) {
 if (dzClosure.files.length>0) {
                        ;

                        dzClosure.processQueue(); 
                    } else {

                        dzClosure.uploadFiles([]);


                    }
}

How i can fix this issue.

When i refereed some of the issues i found following document https://github.com/enyo/dropzone/wiki/FAQ#how-to-show-an-error-returned-by-the-server

even i my case when validation error thrown then it will be 419 but still not working as expected

enter image description here

enter image description here



from Dropzone Processing Queue not working on server side validation

No comments:

Post a Comment