Name
XMLHttpRequestUpload
Inherits from
EventTarget
Synopsis
An XMLHttpRequestUpload object defines a set of event handler
registration properties for monitoring the progress of an HTTP
request body upload. In browsers that implement the XMLHttpRequest
Level 2 specification, each XMLHttpRequest object has an upload property that refers to an object
of this type. To monitor the progress of the request upload, simply
set these properties to appropriate event handler functions or call
the EventTarget methods. Note that the upload
progress event handlers defined here are exactly the same as the
download progress event handlers defined on XMLHttpRequest itself,
except that there is no onreadystatechange property on this
object.
Event Handlers
onabortTriggered if the upload is aborted.
onerrorTriggered if the upload fails with a network error.
onloadTriggered when the upload succeeds
onloadendTriggered when the upload finishes, whether successfully or not. A loadend event will always follow a load, abort, error, or timeout event.
onloadstartTriggered when the upload starts.
onprogressTriggered repeatedly (approximately every 50ms) while the upload is occurring.
ontimeoutTriggered if the upload is aborted because the XMLHttpRequest
timeoutexpired.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access