![](/img/trans.png)
[英]Dropzone - How to make div to dropzone (not form) and autoProcessQueue:false
[英]dropzone autoProcessQueue not getting picked up
我在頁面上使用dropzone上傳圖像,但是由於某種原因,它沒有選擇“ autoProcessQueue”選項
我將這個確切的代碼粘貼到了我的頁面中,並且一旦我從本教程中選擇了圖像,它仍然會上傳: 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.
});
}
};
我遇到了同樣的問題,結果發現我正在使用過時的Dropzone版本。 autoProcessQueue
功能僅在v3.6.0中添加,因此請確保至少使用它。
您必須查看您使autoProcessQueue產生的代碼:false,
使其成為現實
autoProcessQueue:是的,還可以在dropzone.js中檢查此參數的值,並在那里進行更改,這肯定可以。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.