Почему событие xhr.onprogress
срабатывает один раз?
var xhr = new XMLHttpRequest();
var data = new FormData(createGeneralEl.form);
data.append('image', fileL);
xhr.open("POST", '../www/s.php')
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.send(data);
console.log(xhr)
xhr.onprogress = function(e){
console.log(e.loaded)
}
xhr.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
//...
}
};
})(file)