Associate values with uploads (synchronous)

3 posts, 0 answers
  1. Morten
    Morten avatar
    349 posts
    Member since:
    Jul 2012

    Posted 08 Sep 2014 Link to this post

    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 ( mvc)?
  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2310 posts

    Posted 09 Sep 2014 Link to this post

    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!

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Morten
    Morten avatar
    349 posts
    Member since:
    Jul 2012

    Posted 09 Sep 2014 in reply to Dimiter Madjarov Link to this post

    Thanks for your reply.
    I'll go the the hidden field method and synchronous upload.
Back to Top