Fix in posting

This commit is contained in:
Antonio de la Rosa 2021-02-21 18:04:53 +01:00
parent fc5fff5703
commit 31d08f15d8

View file

@ -23,6 +23,23 @@
} }
var xhr=false;
if(!options.hasOwnProperty("upload")) {
xhr = $.ajaxSettings.xhr();
xhr.upload.onprogress = function (event) {
if(event.lengthComputable) {
$("#loaded_n_total").html("Uploaded "+event.loaded+" bytes of "+event.total);
var percent = (event.loaded / event.total) * 100;
$("#progressBar").val(Math.round(percent));
$("#status").html(Math.round(percent)+"% uploaded... please wait");
}
};
}
$(this).on('submit', function (e) { $(this).on('submit', function (e) {