2013-09-25 62 views
2

我用我的頁面上懸浮窗上傳圖片,但由於某種原因它不拿起懸浮窗autoProcessQueue沒有得到拿起

我在我的網頁粘貼這段代碼而選項「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. 
    }); 

    } 
}; 

回答

-1

你必須尋找到我們的代碼,ü做出 autoProcessQueue:假的,

使其真正

autoProcessQueue:真實, 並在dropzone.js 還要檢查該參數的值,並改變它也有,它肯定會工作..

+2

你錯過了這一點。他需要autoProcessQueue = false,因爲他想用提交按鈕來提交它,而不是自動提交。 – KVISH

0

我有同樣的問題,結果證明我使用的是Dropzone的過時版本。 autoProcessQueue功能僅在v3.6.0中添加,因此請確保至少使用該功能。