How populate the file list with previously uploaded files ?

4 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    5 posts
    Member since:
    Apr 2013

    Posted 10 Oct 2013 Link to this post

    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.
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 11 Oct 2013 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Sebastian
    Sebastian avatar
    5 posts
    Member since:
    Apr 2013

    Posted 17 Oct 2013 Link to this post

    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.
  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 18 Oct 2013 Link to this post

    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!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready