各种查,找到了有效的解决代码,记录一下,同时希望可以帮到同行们
totaluploadprogress:function(progress) {
var allProgress = 0;
var allFilesBytes = 0;
var allSentBytes = 0;
for(var a=0;a<this.files.length;a++) {
allFilesBytes = allFilesBytes + this.files[a].size;
allSentBytes = allSentBytes + this.files[a].upload.bytesSent;
allProgress = (allSentBytes / allFilesBytes) * 100;
}
$('#totaluploadprogress').find(".progress-bar").css('width',allProgress + "%");
}
本代码参考:https://github.com/enyo/dropzone/issues/690 中 dnsnx 用户的回答,谢谢,助かりました~