I\'ve made an XHR-based file uploader with progressbar, and I would like to add a feature to cancel the upload before it fully uploaded. The simlified code (runs after DOM r
Ok, I noticed that the event name is onabort. With the xhr.abort = ... line I overwrote the abort function. So the solution:
xhr.abort = ...
xhr.onabort = function(){...};
or
xhr.addEventListener("abort", function(){...});