📜  dropzone 添加下载按钮 addedfile - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:17.556000             🧑  作者: Mango

代码示例1
//Prepare the drop zone area
var myNewdDropzone = new Dropzone("#idOfForm",  {
    url: "my-ajax.php",
    method: "POST",
    addRemoveLinks: false,
    clickable: true,
    previewTemplate: document.querySelector('#preview-template').innerHTML,
    init : function() {
        this.on("addedfile", function(file) { new_file_added(file); });
        this.on("thumbnail", function(file,fileurl) { new_thumbnail_added(file); });
        this.on("removedfile", function(file) { new_file_removed(file); });
        this.on("totaluploadprogress", function(progress) { display_progress(progress); });
        this.on("queuecomplete", function() { all_files_uploaded(); });
        //this.on("processing", function(file) { new_file_processed(file); });
    }
});