Pass object File to FileUpload

2 posts, 1 answers
  1. Mirek
    Mirek avatar
    6 posts
    Member since:
    Jul 2015

    Posted 08 May 2017 Link to this post

    I have strange requirement thath I need upload file after form close. So user selects files I have event listener which set object File as global and after close form I wat to send it on server.

    Is there is some hidden API to achive thath..... in JQuery I can

     var formData = new FormData();
    formData.append('file', file);
    $.ajax({
        url: '/',
    type: 'POST',
    data: formData,
    processData: false,
    contentType: false,
    success: function( res ) {
    // Handle it.
    }
    });

     

  2. Answer
    Ianko
    Admin
    Ianko avatar
    1940 posts

    Posted 10 May 2017 Link to this post

    Hello Mirek,

    I am not sure how Kendo Upload would help in this case. Using jQuery and a form as shown would be a much simpler way to accomplish that. 

    However, you can check the discussion in this thread and see if the solutions for programmatically appending a file input to the Kendo Upload would work for you: http://stackoverflow.com/questions/13921058/how-to-populate-kendo-upload-with-previously-uploaded-files

    Regards,
    Ianko
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top