Fires when the files are cleared by clicking on the Clear button.

The cancelling of the cancel event prevents the clearing of the selected files.

Example - wiring up an event handler that triggers when a user clears the selected files

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

    function onClear(e) {
        // Optionally cancels the clear operation by calling the preventDefault method

Event Data

e Object

A custom event object. The event can be canceled similar to a standard jQuery event object by using e.preventDefault();.

In this article