I have a function which showing progress of uploading files to the server:
function progress(event) { ... } ... for (var i = 0; i<files.length; i++) { xhr.upload.onprogress = progress; } progress function is in for loop, and executes once for every file. In progress function I want to write how many percent is uploaded, I can do it for one file, but if I uploading not one file, then I don't know how to make progress for every file. Can I add a parameter of loop to progress function?