如何在 addedfile 事件中获取 addedfiles 的计数?
How get the count of addedfiles in addedfile event?
如何在addedfile事件中获取addedfiles的总数?
uploader.on("addedfile", function(file){
here - how I can get the total number of addedfiles?
});
非常感谢您的帮助。
this.files
始终保存所有已删除文件的列表。
如果只想获取已接受的文件,可以使用this.getAcceptedFiles();
因此,要回答您的问题,请使用以下任一方法:
var totalFileCount = this.files.length;
// or
var totalFileCount = this.getAcceptedFiles().length;
如何在addedfile事件中获取addedfiles的总数?
uploader.on("addedfile", function(file){
here - how I can get the total number of addedfiles?
});
非常感谢您的帮助。
this.files
始终保存所有已删除文件的列表。
如果只想获取已接受的文件,可以使用this.getAcceptedFiles();
因此,要回答您的问题,请使用以下任一方法:
var totalFileCount = this.files.length;
// or
var totalFileCount = this.getAcceptedFiles().length;