how to upload a large file with asp net mvc4 web api with progressbar using -'c#,,,'

how to upload a large file with asp net mvc4 web api with progressbar  using -'c#,,,'

how can i upload a large file with ASP.NET MVC4 Web Api
and also get a progress?

i saw this post and i understand how to handle the uploaded file but how i can get the progress data?
How To Accept a File POST - ASP.Net MVC 4 WebAPI

please don't send me links to upload products.
i want to understand how handle this in the MVC4 Web Api way...
here is an example code of handling a file upload in MVC4 WebApi

    public async Task<HttpResponseMessage> Post()
        if (Request.Content.IsMimeMultipartContent())
            var path = HttpContext.Current.Server.MapPath("~/App_Data");

            var provider = new MultipartFormDataStreamProvider(path);

            await Request.Content.ReadAsMultipartAsync(provider).ContinueWith(t =>
                if (t.IsFaulted || t.IsCanceled)
                    throw new HttpResponseException(HttpStatusCode.InternalServerError);

            return Request.CreateResponse(HttpStatusCode.OK);
            throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotAcceptable, "This request is not properly formatted"));

now when

   await Request.Content.ReadAsMultipartAsync(provider)

how can i get how bytes loaded?

asked Sep 7, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.