remove

Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented.

Example

<input type="file" name="files" id="photos" />
<script>
    $("#photos").kendoUpload({
        async: {
            saveUrl: "http://my-app.localhost/save",
            removeUrl: "http://my-app.localhost/remove"
        },
        remove: onRemove
    });

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

        // Processes the remove event
        // Optionally cancels the remove operation by calling
        // e.preventDefault()
    }
</script>

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, 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.
e.headers Object

Represents the additional headers that will be added to the remove request.

data Object

Represents an optional object that is sent to the remove handler in the form of key/value pairs.

In this article