This is a migrated thread and some comments may be shown as answers.

Cancel an upload in progress (async)

2 Answers 86 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Veteran
Jason asked on 15 Jun 2020, 10:49 PM
How would one go about cancelling an upload in progress? AutoUpload is off, and I'm using Async.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 17 Jun 2020, 01:41 PM

Hello Jason,

Here's a dojo example showing how a upload in progress can be cancelled: https://dojo.telerik.com/aSUHEDAQ/2

The relevant logic is the following one and it is executed on clicking the button above the Upload:

$("#cancelUploadingFile").on('click', function(e){
  $(".k-file .k-i-cancel").click()
})

The same approach can be used for the Upload's ASP.NET MVC helper.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Jason
Top achievements
Rank 1
Veteran
answered on 17 Jun 2020, 05:14 PM
This worked a charm. Thanks!
Tags
Upload
Asked by
Jason
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Jason
Top achievements
Rank 1
Veteran
Share this question
or