UNPKG

@progress/kendo-angular-upload

Version:

Kendo UI Angular Upload Component

54 lines (53 loc) 1.88 kB
/**----------------------------------------------------------------------------------------- * 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 { PreventableEvent } from './preventable-event'; import { FileInfo } from '../types'; /** * Arguments for the `remove` event. The `remove` event fires when an uploaded * or selected file is about to be removed. If you cancel the event, the removal is prevented. * * ```ts-no-run * @Component({ * selector: 'my-upload', * template: ` * <kendo-upload * [saveUrl]="uploadSaveUrl" * [removeUrl]="uploadRemoveUrl" * (remove)="removeEventHandler($event)"> * </kendo-upload> * ` * }) * export class UploadComponent { * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint * * removeEventHandler(e: RemoveEvent) { * console.log('Removing a file'); * } * } * ``` */ export declare class RemoveEvent extends PreventableEvent { /** * An optional object that is sent to the `remove` handler in the form of a key/value pair. */ data: Object; /** * The list of the files that will be removed. */ files: Array<FileInfo>; /** * The headers of the request. */ headers: HttpHeaders; /** * @hidden * Constructs the event arguments for the `remove` event. * @param files - The list of the files that will be removed. * @param headers - The headers of the request. */ constructor(files: Array<FileInfo>, headers: HttpHeaders); }