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

Upload component does not fire event 'OnFileUpload()' when clicking 'retry' icon

4 Answers 138 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Jesper
Top achievements
Rank 1
Veteran
Jesper asked on 12 Oct 2020, 03:14 PM

Hi

I have defined an OnUpload handler like this on the TelerikUpload:

<TelerikUpload AutoUpload="false" ...  OnUpload="@OnUploadHandler" ></TelerikUpload>

 

It turns out that the handler is only called when I click on the 'Upload' button. If the upload fails, the retry icon is shown. However when clicking on the Retry icon, the OnUpload handler is not called.

In my case that is a problem, because I add headers and request in this event:

async Task OnUploadHandler(UploadEventArgs e)
{
    e.RequestData.Add("SomeFormField", "Hello world!"); // for example, user name
    e.RequestHeaders.Add("Authorization", "Bearer " + Token); // for example, authentication token
}

 

It does not matter if the request is to same host or cross-domain.

Best regards


 

 

 

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Oct 2020, 07:25 AM

Hi Jesper,

You can Follow the fix for that here: https://feedback.telerik.com/blazor/1465957-the-retry-button-does-not-fire-onupload-and-you-can-t-attach-auth-tokens. I'm afraid there is no workaround I can offer.

 

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Jesper
Top achievements
Rank 1
Veteran
answered on 13 Oct 2020, 07:50 AM

Hi Marin

Thanks :-)

 

0
Edward
Top achievements
Rank 1
Veteran
Iron
answered on 24 Nov 2020, 10:44 PM
Just ran into this issue.  Is there a fix planned for this?
0
Marin Bratanov
Telerik team
answered on 25 Nov 2020, 07:56 AM

Hello Edward,

The best way to know when this gets fixed is to click the Follow button on its portal page. Once we know the release it will be in, that information will be added to the page and you will receive an email. I've also added your Vote on your behalf to raise its priority (you can do that yourself by clicking the Vote button on items that interest you).

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Upload
Asked by
Jesper
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Jesper
Top achievements
Rank 1
Veteran
Edward
Top achievements
Rank 1
Veteran
Iron
Share this question
or