framework7
framework7 copied to clipboard
ajax xhr track upload progress not working
Hi, I was using:
xhr: function() {
var myXhr = $.ajaxSettings.xhr();
if(myXhr.upload){
myXhr.upload.addEventListener('progress',progress, false);
}
return myXhr;
}
to track upload status and update a progress bar, but that's with jQuery $.ajax, but after changing to F7 $$.ajax, it is not working anymore.
am i missing something?
It should be:
var xhr = $$.ajax(...);
xhr.addEventListener('progress', progress, false);
it is not work either, because the event is not "lengthComputable"