UNPKG

@progress/kendo-angular-upload

Version:

Kendo UI Angular Upload Component

56 lines (55 loc) 1.79 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { PreventableEvent } from './preventable-event'; /** * 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 class RemoveEvent extends PreventableEvent { /** * An optional object that is sent to the `remove` handler in the form of a key/value pair. */ data; /** * The list of the files that will be removed. */ files; /** * The headers of the request. */ headers; /** * @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, headers) { super(); this.files = files; this.headers = headers; } }