Possible to Post Files to Controller via jQuery instead of through the .Save Action?

2 posts, 0 answers
  1. Landon
    Landon avatar
    66 posts
    Member since:
    Nov 2010

    Posted 29 Oct 2013 Link to this post


    I'm looking to use the Kendo Upload control to Import vCards onto a Contact Creation page. Since I want to return a PartialView, and populate a Div's .html attribute, I'd like to do this as a jQuery Post like I've outlined below:
         .Async(a => a
             .Save("UploadContact", "Contacts") /*Don't really need this if I can post via jQuery */
         .Events(events => events
    function onUpload(e) {
            var upload = $("#vCard").data("kendoUpload");
            var files = upload.files;
            var serialized = "vCard=" + files;
            $.post("/Contacts/UploadContact/", serialized, function (returnHtml) {
    My issue is that I am constantly getting a null object when posting to /Contacts/UploadContact using jQuery.

    Is there any way to pass the entire file list (including FileStream) back to the controller from jQuery like I've outlined in the "onUpload" method?

    Any help would be greatly appreciated.

  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2310 posts

    Posted 30 Oct 2013 Link to this post

    Hello Landon,

    The Upload widget does not support such scenario. If you would like to manually implement file upload functionality, you could find additional information on the internet.


    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top