[英]dropzone autoProcessQueue not getting picked up
I am using dropzone on my page to upload images, but for some reason it is not picking up the option "autoProcessQueue" 我在页面上使用dropzone上传图像,但是由于某种原因,它没有选择“ autoProcessQueue”选项
I pasted this exact code in my page and it still uploads as soon as i select the image from this tutorial: https://github.com/enyo/dropzone/wiki/Upload-all-files-with-a-button 我将这个确切的代码粘贴到了我的页面中,并且一旦我从本教程中选择了图像,它仍然会上传: https : //github.com/enyo/dropzone/wiki/Upload-all-files-with-a-button
Dropzone.options.myDropzone = {
// Prevents Dropzone from uploading dropped files immediately
autoProcessQueue: false,
init: function() {
var submitButton = document.querySelector("#submit-all")
myDropzone = this; // closure
submitButton.addEventListener("click", function() {
myDropzone.processQueue(); // Tell Dropzone to process all queued files.
});
// You might want to show the submit button only when
// files are dropped here:
this.on("addedfile", function() {
// Show submit button here and/or inform user to click it.
});
}
};
I had the same issue, and it turned out that I was using an outdated version of Dropzone. 我遇到了同样的问题,结果发现我正在使用过时的Dropzone版本。 The
autoProcessQueue
feature was only added in v3.6.0, so make sure you use at least that. autoProcessQueue
功能仅在v3.6.0中添加,因此请确保至少使用它。
You have to look into ur code that u have made autoProcessQueue: false, 您必须查看您使autoProcessQueue产生的代码:false,
make it true 使其成为现实
autoProcessQueue: true, and also check this parameter's value in your dropzone.js and change it there also, It will definitely work.. autoProcessQueue:是的,还可以在dropzone.js中检查此参数的值,并在那里进行更改,这肯定可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.