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

How populate the file list with previously uploaded files ?

3 Answers 1153 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 11 Oct 2013, 01:52 AM
Hi,

I have the kendoui.aspnetmvc.2013.2.918 version, so I want to know if it is possible to populate the Upload control with a previously uploaded file and be able to remove the file if I want.
If it is not supported now, are you planning to add this functionality in a new release ?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 11 Oct 2013, 07:37 AM
Hello Sebastian,


Yes, this feature is currently supported for the Kendo UI async Upload. Additional information could be found in the documentation and in our demos.

Please let me know if this information was helpful for you or I could assist you further.

 

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
Sebastian
Top achievements
Rank 1
answered on 18 Oct 2013, 12:48 AM
Hi,
I have the upload control defined in a javascript file, something like this:
$("#files").kendoUpload({
       multiple: true,
       async: {
              saveUrl: "save",
              removeUrl: "remove",
              autoUpload: true
       },
       files: initialFiles,
       success: onSuccess
});
and in the controller I was thinking to define an ActioResult method that return the name of the uploaded file through a service. But I don't know how to get the name of the file in the javascript. I mean how do I pass this name to the "initialFiles" that I defined in the control ? Can you give me an example code of the controller and the javascript ?
Thanks in advance.
0
Dimiter Madjarov
Telerik team
answered on 18 Oct 2013, 11:02 AM
Hi Sebastian,


This is described in the documentation. The objects in the initial files array should contain name, size and extension properties in order to be rendered correctly. You could find a sample code in the documentation and in our demos section.

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Upload
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Sebastian
Top achievements
Rank 1
Share this question
or