A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/xhr/XMLHttpRequest/upload below:

upload ยท WebPlatform Docs

upload Summary

Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.

Property of apis/xhr/XMLHttpRequestapis/xhr/XMLHttpRequest

Syntax

Note: This property is read-only.

var result = element.upload;
Return Value

Returns an object of type

XMLHttpRequestUpload. Each XMLHttpRequest object has an associated XMLHttpRequestUpload object.

Examples
function transferComplete(evt) {
  alert("The transfer is complete.");
}

function transferFailed(evt) {
  alert("An error occurred while transferring the file.");
}

function transferCanceled(evt) {
  alert("The transfer has been canceled by the user.");
}

var xhr= new XMLHttpRequest();

xhr.upload.addEventListener("load", transferComplete, false);
xhr.upload.addEventListener("error", transferFailed, false);
xhr.upload.addEventListener("abort", transferCanceled, false);

xhr.open();
Related specifications
W3C XMLHttpRequest Specification
W3C Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4