New to Kendo UI for Angular? Start a free 30-day trial
UploadEvent
Arguments for the upload
event. The upload
event fires when you are about
to upload one or more files. You can cancel this event to prevent upload and add headers to the request.
typescript
@Component({
template: `
<kendo-upload (upload)="uploadEventHandler($event)"></kendo-upload>
`
})
export class UploadComponent {
public uploadEventHandler(e: UploadEvent) {
e.headers = e.headers.append('X-Foo', 'Bar');
}
}
Name | Type | Default | Description |
---|---|---|---|
data |
|
The optional object that you send to the | |
files |
|
The files that you will upload to the server. | |
headers |
|
The headers of the request. You can use this to add custom headers to the upload request. |
Methods
isDefaultPrevented | ||||
---|---|---|---|---|
If the event is prevented by any of its subscribers, returns | ||||
|
preventDefault |
---|
Prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event. |