简体   繁体   English

如何告诉dropzone.js上传完成?

[英]How to tell dropzone.js the upload is complete?

I am trying out dropzone.js and can't figure out how to let the browser know the upload is complete. 我正在尝试dropzone.js,但无法弄清楚如何让浏览器知道上传已完成。

I am using this example as my base. 我以这个例子为基础。 It sends it to the right action, I got it to send the csrf-token but I can't seem to find how to sent it progress data and tell it when the upload is done. 它将其发送到正确的操作,我已发送它来发送csrf令牌,但似乎无法找到如何发送进度数据并告知上传完成的时间。

Try this: 尝试这个:

$(function() {
      // Now that the DOM is fully loaded, create the dropzone, and setup the
      // event listeners
      var myDropzone = new Dropzone("#my-dropzone");
      myDropzone.on("success", function(file) {
        /* Maybe display some more file information on your page */
      });
    })

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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