• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UI
    • Data Query
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Ganttupdated
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGrid
    • Popup
    • ProgressBars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetnew
    • ToolBar
    • Tooltips
    • TreeListupdated
    • TreeViewupdated
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

CancelEvent

Arguments for the cancel event. The cancel event fires when the user cancels the process of uploading a file or a batch of files.

 @Component({
   selector: 'my-upload',
   template: `
   <p>Click the <span class='k-icon k-font-icon k-i-cancel'></span> icon during upload to trigger the event</p>
   <kendo-upload
     [saveUrl]="uploadSaveUrl"
     [removeUrl]="uploadRemoveUrl"
     (cancel)="cancelEventHandler($event)">
   </kendo-upload>
   `
 })
 export class UploadComponent {
   uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
   uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint

   cancelEventHandler(e: CancelEvent) {
     console.log('Canceling file upload', e.files);
   }
 }
NameTypeDefaultDescription

files

FileInfo[]

The list of the files that were going to be uploaded.

In this article

Not finding the help you need?