jquery - Ajax xhr.upload.addEventListener doing big progress steps -


i have trouble showing progress of jquery ajax upload.

here ajax call:

jquery.ajax({             url: aurl,             method: 'post',             datatype: 'text',             data: data,             crossdomain: true,             processdata: false,             success: function() {                 this.saveentrysuccess(transportno, id);             }.bind(this),             error: function(response) {                 this.saveentryfail(response, id, transportno);             }.bind(this),             xhr: function() {                 var myxhr = $.ajaxsettings.xhr();                 if(myxhr.upload){                     myxhr.upload.addeventlistener('progress', this.progress, false);                 }                 return myxhr;             }.bind(this)         }); 

this works fine , in "this.progress" calculate progressbar. fine until here.

in safari , edge event calls , progressbar working smooth. 1,2,4,5,6,8% , on. in chrome(version 54.0.2840.87), firefox(49.0.2) , ie(11.321.14393.0) there big steps 40%,77%,100%. tested big files, need 10 seconds 1 step. when hits 100% upload still in progress (in chrome,firefox , ie), observed in network, seconds until response enter. why event fire less in browsers? use better solution?

thanks

ckk


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -