0
我正在關注basic plus演示,幾乎到了tee,並且無法使進度條正常工作。下載console.log
下載按鈕點擊返回100%。Blueimp jQuery上傳進度 - 直接到100%
$('#fileupload').fileupload({
url: url,
dataType: 'json',
autoUpload: false,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|pdf)$/i,
maxFileSize: 5000000, // 5 MB
// Enable image resizing, except for Android and Opera,
// which actually support image resizing, but fail to
// send Blob objects via XHR requests:
disableImageResize: /Android(?!.*Chrome)|Opera/
.test(window.navigator.userAgent),
previewMaxWidth: 100,
previewMaxHeight: 100,
previewCrop: true,
formData:function(form){
//get file name
var $this = this;
var formSelector = 'form-' + $($this.files)[0].name.replace(/\W/g,'-');
return $('.'+formSelector).serializeArray();
},
progressall:function(e,data){
var progress = parseInt(data.loaded/data.total * 100, 10);
$('#progress .progress-bar').css('width', progress + '%');
console.log(progress);
}
})
我不知道這篇文章的解決方案是否解釋了這種情況:http://stackoverflow.com/questions/14691236/largegap-between-last-file-progress-hitting-100-and-the-stop-done -events – 2015-10-30 18:26:43