Fires when an upload or remove operation fails.

The error event fires only when the Upload is in async mode.


<input type="file" name="files" id="photos" />
        async: {
            saveUrl: "http://my-app.localhost/save",
            removeUrl: "http://my-app.localhost/remove"
        error: onError

    function onError(e) {
        // An array with information about the uploaded files
        var files = e.files;

        if (e.operation == "upload") {
            alert("Failed to upload " + files.length + " files");

Event Data

e.files Array

Lists the files that were uploaded or removed.

Each file has:

  • name
  • extension - The file extension including the leading dot. For example, .jpg, .png, an so on.
  • size - The file size in bytes. If not available, the value is null.
  • uid - The unique identifier of the file or batch of files.
e.operation String

The upload or remove operation.

e.XMLHttpRequest Object

Represents either the original XHR that is used for the operation or a stub that contains:

  • responseText
  • status
  • statusText

Before you access any other fields, verify that this is an actual XHR.

In this article