New to Kendo UI for Angular? Start a free 30-day trial

ErrorEvent

Arguments for the error event. The error event fires when an upload or remove operation fails.

 @Component({
   selector: 'my-upload',
   template: `
   <kendo-upload
     [saveUrl]="uploadSaveUrl"
     [removeUrl]="uploadRemoveUrl"
     (error)="errorEventHandler($event)">
   </kendo-upload>
   `
 })
 export class UploadComponent {
   uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
   uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint

   errorEventHandler(e: ErrorEvent) {
     console.log('An error occurred');
   }
 }

files

Array<FileInfo>

The list of the files that failed to be uploaded or removed.

operation

OperationType

The operation type (upload or remove).

response

HttpResponse<any>

The response object returned by the server.

Constructors

ErrorEvent

(files: Array<FileInfo>, operation: OperationType, response: HttpResponse<any>)

Constructs the event arguments for the error event.

Parameters

files

Array<FileInfo>

The list of the files that failed to be uploaded or removed.

operation

OperationType

The operation type (upload or remove).

response

HttpResponse<any>

The response object returned by the server.