Appending file to uploaded file list via jQuery

3 posts, 1 answers
  1. Fred
    Fred avatar
    4 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2015 Link to this post

    I have found how to initialize the upload widget with an initial list of files that were previously uploaded but I need to know how to append another file to that list from jQuery.

    Some background, I have a button on a form that submits information to another remote system.  That remote system will generate a file within 5-10 seconds and add it to my database records with the pertinent information.  A polling process will begin waiting for the file to come from the remote system.  Once the file has been added to the database, I need to add it to the Kendo upload widget along with the initial files that are already there.

     I have the whole process working, and the polling process returns the filepath, filename, and filesize as required by the control but I cannot find any documentation on how to add to the file list after the widget is already initialized.

  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 14 Jul 2015 Link to this post

    Hello Fred,

    The initial files list cannot be modified via jQuery, but a sample approach would be to destroy and recreate the widget with the new list. I demonstrated the approach in the following example.

    I with 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!
     
  3. Kendo UI is VS 2017 Ready
  4. Fred
    Fred avatar
    4 posts
    Member since:
    Jul 2012

    Posted 14 Jul 2015 in reply to Dimiter Madjarov Link to this post

    That worked perfectly.  Thanks Dimiter!
Back to Top