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

Appending file to uploaded file list via jQuery

2 Answers 1589 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Fred
Top achievements
Rank 1
Fred asked on 13 Jul 2015, 09:44 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 14 Jul 2015, 10:58 AM

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!
 
0
Fred
Top achievements
Rank 1
answered on 14 Jul 2015, 04:02 PM
That worked perfectly.  Thanks Dimiter!
Tags
Upload
Asked by
Fred
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Fred
Top achievements
Rank 1
Share this question
or