Fires when the upload was cancelled while in progress.

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

To remove the data of a file that has been canceled, manually call the remove handler. For more information refer to the limitation of the removeFile method


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

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

        // Processes the cancel event

Event Data

e.files Array

A list of the files that were uploaded or removed.

Each file has:

  • name
  • extension - The file extension including the leading dot. For example, .jpg, .png, and 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.
In this article