繁体   English   中英

dropzone autoProcessQueue未被拾取

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM