MVC Upload File Select Order

2 posts, 0 answers
  1. Luis
    Luis avatar
    1 posts
    Member since:
    Jul 2014

    Posted 03 Apr 2015 Link to this post

    I need to know the order in what the files were selected in an upload widget that is set to ASYNC, Allow multi and auto upload true. Any ideas how this can accomplish?
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 posts

    Posted 06 Apr 2015 Link to this post

    Hello Luis,

    A sample approach would be to send metadata to the save handler using the upload widget client side event. In the current case you could send the index of the file in the file list.
    E.g.

    function upload(e) {
        var uid = e.files[0].uid;
        var file = this.wrapper.find(".k-file[data-uid='" + uid + "']");
        var index = file.index();
     
        e.data = {
            index: index
        }
    }

    Regards,
    Dimiter Madjarov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top