problem description
the data is displayed only once in console every time the picture is loaded, so it is suspected that onprogress is not listening all the time.
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
reader.onprogress = function(e) {
if (e.lengthComputable) {
let percent = Math.round(e.loaded / e.total * 100);
console.log(e.loaded);
}
};
what result do you expect? What is the error message actually seen?
should display a series of e.loaded like a waterfall