Ajax upload picture acquisition progress

use ajax to upload pictures, how to get the real upload progress.

Jan.13,2022

    $.ajax({
        url:'url',
        data:formData,
        type: 'POST',
        cache: false,
        contentType: false,
        processData: false,
        success:function(data){
            
        },
        xhr:function(){ //
            var myXhr = $.ajaxSettings.xhr(); 
               if(myXhr.upload){ // check if upload property exists 
                   myXhr.upload.addEventListener('progress',function(e){ 
                       var loaded = e.loaded;//
                    var tot = e.total;//
                    var per = Math.floor(100*loaded/tot);  //
                    console.log(per)
                }, false); 
            }  
              return myXhr;  
          }
    })
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-1b3cf5d-408e1.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-1b3cf5d-408e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?