Given the following code, which is extremely general, I was hoping someone could tell me a little bit about what goes on behind the scenes ...
[HttpPost] public ActionResult Load(Guid regionID, HttpPostedFileBase file) { if (file.ContentLength == 0) RedirectToAction("blablabla....."); var fileBytes = new byte[file.ContentLength]; file.InputStream.Read(fileBytes, 0, file.ContentLength); }
In particular, is the file fully uploaded to the server before the action method is called? Or is it a call to the file.InputStream.Read () method that calls or rather waits for the entire file to load. Can I do partial reads in a stream and access the βchunksβ of a file as it is loading? (If all the fire is loaded before my method starts, then everything will be debatable.)
Can someone please give me some good info on internal work here. Is there any difference between IIS6 or II7 here?
Thanks,
source share