Doubts about input uploaded by H5

Why is it that when I call FileReader"s onprogressAPI to set the progress, the upload will get stuck in the middle of the upload, and then finish it directly after a while?

question code is as follows:

     var reader = new FileReader();
     reader.onprogress = function(ev) {
         setTimeout(function(){ hr.style.width = parseInt(ev.loaded*100 / ev.total) + "%"; }, 1)
         pro.value = ev.loaded;
     }
     reader.readAsDataURL(upload.files[0]);

I want to change the progress bar according to the actual progress.

May.22,2021

what exactly do you mean by stuck?


whether the uploaded file is not large enough and is local, so immediately upload
try to upload a larger file from the local to the extranet server

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39a49-4ee15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39a49-4ee15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?