I have an ASP.NET MVC action that receives a file via HttpPostedFileBase.
I want to start reading from the stream as soon as possible. This is so I can report upload progress (via a separate mechanism). The issue that I have is that my break point inside this action is not hit until the uploaded file is available in it's entirety.
How can I being reading the posted file stream before it's fully uploaded?
[HttpPost]
public ActionResult Upload(HttpPostedFileBase uploadFile)
{
... uploadFile has been fully uploaded before this point
}
Edit: Update - I've now tried another way, implementing this logic via an HttpHandler, but still, the moment I begin to read from the stream, the code blocks until the file stream has completed upload to the server.
No luck as yet.