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

Upload doesn't work as expected in partial view

3 Answers 318 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Yauheni
Top achievements
Rank 1
Veteran
Yauheni asked on 16 Sep 2020, 07:06 AM
Greetings.
I created partial view (editable grid with pop-up) of uploaded files.
Kendo Upload element is in pop-up window.
This partial view works well on all views, except one.
When I inspect upload element in browser in that "non-working" view it shows <input type="file"> instead of <div class="k-widget k-upload k-upload-async ...> like in "working" views and uploading logic doesn't work at all.
Can you help me with this issue?
Thanks
Best regards, Yauheni

3 Answers, 1 is accepted

Sort by
0
Yauheni
Top achievements
Rank 1
Veteran
answered on 16 Sep 2020, 08:48 AM
I have found that I have already had one upload element on that "non-working" view. If I delete this element, the upload in partial view works well. Do multiple upload elements on one page conflict?
0
Neli
Telerik team
answered on 18 Sep 2020, 03:02 PM

Hello Yauheni,

Multiple Upload controls could be placed on one page without any issues. However, in case both widgets have the same id such an issue could be observed. I would suggest you double-check if both Uploads have the same id or when using the Html/TagHelpers if the .Name is the same.

The observed behavior is documented in the following articles:

- https://docs.telerik.com/kendo-ui/troubleshoot/troubleshooting-common-issues#creating-multiple-widgets-throws-javascript-errors

- https://docs.telerik.com/aspnet-mvc/troubleshoot/troubleshooting#only-one-widget-instance-works-on-page

In the Dojo example linked here, you will find an example of having two elements with the same id. As you will see only one Kendo Upload widget is initialized. 

I hope this helps.

Regards,
Neli
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
Yauheni
Top achievements
Rank 1
Veteran
answered on 13 Oct 2020, 07:21 AM
Thank you, I had 2 uploads with the same name on one page, so I had an issue.
Tags
Upload
Asked by
Yauheni
Top achievements
Rank 1
Veteran
Answers by
Yauheni
Top achievements
Rank 1
Veteran
Neli
Telerik team
Share this question
or