This is a migrated thread and some comments may be shown as answers.

Cancelling upload from upload event

1 Answer 533 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 14 Nov 2011, 05:43 PM
In the documentation is states:

Fires when one or more files are about to be uploaded. Cancelling the event will prevent the upload.

How exactly do you cancel the event?, I have tried to return false from the event but this has no affect.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 15 Nov 2011, 08:49 AM
Hi Joel,

The proper way to cancel the event is to call preventDefault:

function onUpload(e) {
    e.preventDefault();
}

We'll update the documentation on the subject.

All the best,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Upload
Asked by
Joel
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or