What should I do if in Dropzone.js autoloading occurs automatically if the file gives an error?

42 views Asked by At

I included the dropzone.js library, but there was a problem. I have the autoProcessQueue parameter: false, and the files are not sent as they should be, with the exception of one case: when the first file throws an error (in my case it was an error that the file is too large). This error occurs only if the first downloaded file has an error; if it is downloaded second, there will be no such problem.

<div id="myDropzone" class="dropzone">
<div class="dz-default dz-message">
    <span>Choose image or Drag & Drop it</span>
</div>
</div>
<script>
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("#myDropzone", {
    url: "/",
    paramName: "file",
    maxFilesize: 5,
    acceptedFiles: "image/*",
    addRemoveLinks: true,
    autoProcessQueue: false,
});
myDropzone.on("queuecomplete", function () {
    console.log('queue complete');
});
</script>

The queuecomplete event is executed if the first file has an error, although it should not

0

There are 0 answers