XMLHttpRequest.upload
The XMLHttpRequest.upload property returns an XMLHttpRequestUpload
object, representing the upload process. It is an opaque object, but being an XMLHttpRequestEventTarget
, event listeners can be set on it to track its process.
Event listeners that can be triggered on an upload object are the following:
onloadstart | The fetch starts |
onprogress | Data transfer is going on |
onabort | The fetch operation was aborted |
onerror | The fetch failed |
onload | The fetch succeeded |
ontimeout | The fetch operation didn't complete by the timeout the author specified |
onloadend | The fetch operation completed (either success or failure) |
Specifications
Specification | Status | Comment |
XMLHttpRequest | Living Standard | WHATWG living standard |
Browser compatibility
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
Basic support | ? | (Yes) | ? | ? | ? | ? |
Feature | Android | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
Basic support | ? | ? | ? | ? | ? | ? | ? |