Example Async Upload usage in .net Core

4 posts, 0 answers
  1. Richard Lewis
    Richard Lewis avatar
    7 posts
    Member since:
    Nov 2009

    Posted 12 Feb Link to this post

    Please provide an example of Async file upload in Razor using .net Core. The only examples I can find use the HttpPostedFileBase which is replaced in .net core.

    http://demos.telerik.com/aspnet-mvc/upload/async

    Please post a how to, or direct me to an appropriate existing document guide on how to implement this in .net core. Is this supported yet? If so where can I find the correct documentation with demos and example code?

    Thanks

  2. Richard Lewis
    Richard Lewis avatar
    7 posts
    Member since:
    Nov 2009

    Posted 12 Feb in reply to Richard Lewis Link to this post

    Just found it, must be blind...

    http://demos.telerik.com/aspnet-core/upload/async

     

  3. Richard Lewis
    Richard Lewis avatar
    7 posts
    Member since:
    Nov 2009

    Posted 12 Feb Link to this post

    However, perhaps the code should be updated as the 'SaveAs' method is no longer available. Perhaps something like this?

    using (var fileStream = new FileStream(destinationPath, FileMode.Create))
    {
    await file.CopyToAsync(fileStream);
    }

  4. Nencho
    Admin
    Nencho avatar
    1645 posts

    Posted 15 Feb Link to this post

    Hello Richard,

    I am happy to see that you were able to find the needed demo and implementation. As for the SaveAs method - your observations are absolutely correct and this will be fixed as soon as possible.

    As a token of gratitude for pointing that out, I have updated your Telerik Points.

    Thank you for your feedback!

    Regards,
    Nencho
    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