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

Associate values with uploads (synchronous)

2 Answers 127 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 08 Sep 2014, 08:22 PM
I have a form I'd like to submit synchronously.
The form has multiple upload widgets, each with unique names:

<input id="file-21-103" name="file-21-103" class="picture" type="file" data-itemoptionid="103" />
<input id="file-22-104" name="file-22-104" class="picture" type="file" data-itemoptionid="104" />

How can I retrieve either the id, the name, the data-... attrib of the upload element server-side (asp.net mvc)?

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 09 Sep 2014, 08:15 AM
Hi Morten,


The current scenario is not supported. The synchronous Upload widget is basically an <input type='file'/> styled as a Kendo Upload, so it's functionality does not differ from a regular input. A sample workaround would be to add hidden input elements to the form for the additional values and submit them too.

If you would like to use the asynchronous version of the Upload, you could use the following approach to send the additional metadata.

I wish you a great day!

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 09 Sep 2014, 01:00 PM
Thanks for your reply.
I'll go the the hidden field method and synchronous upload.
Tags
Upload
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Dimiter Madjarov
Telerik team
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or