I want to make a upload progress bar but it does not work this function xhr.upload.addEventListener("progress", function (e){...})... response error error undefined
$.ajax({ xhr: function () { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener("progress", function (e) { if (e.lengthComputable) { console.log(e.loaded + " / " + e.total) } }, false); return xhr; }, type: "POST", url: server + '/api/UserFiles/UploadFile', contentType: false, processData: false, data: data, success: function (result) { alert("Uploaded Success"); }, error: function (err) { console.log(err); } }); on the consol the respones is: Error error undefined
errin the error callback, just(xhr, status, p3, p4).