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