@progress/kendo-angular-upload
Version:
Kendo UI Angular Upload Component
48 lines (47 loc) • 1.71 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { HttpHeaders } from '@angular/common/http';
import { FileInfo } from '../types';
import { PreventableEvent } from './preventable-event';
/**
* 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');
* }
* }
* ```
*/
export declare class UploadEvent extends PreventableEvent {
/**
* The optional object that you send to the `upload` handler as key/value pairs.
*
*/
data: Object;
/**
* The files that you will upload to the server.
*/
files: Array<FileInfo>;
/**
* The headers of the request.
* You can use this to add custom headers to the upload request.
*/
headers: HttpHeaders;
/**
* @hidden
* Constructs the event arguments for the `upload` event.
* @param files - The list of the files that will be uploaded.
* @param headers - The headers of the request.
*/
constructor(files: Array<FileInfo>, headers: HttpHeaders);
}