Somebody in this forum most have dealt with this issue, and I could really use some advice. Perhaps my last post was not worded correctly, here's a simplification: The built-in file upload handling features of ASP.NET load the entire request into server
memory before you can save the file. If the file is large, this can cause execution timeouts, or at the very least, consume *huge* amounts of server memory. What I am looking for is a way to intercept an incoming request (asynchronously, I suppose) so that
I can process the incoming bytes in smaller chucks, saving each chunk to the file as it is received, rather than waiting for the entire request to get loaded into server memory before processing. On the client side, I am using the standard <input type="file"
/> tag, so the uploaded file(s) are sent in a multipart/form-encoded POST to the server. Has anybody dealt with processing incoming request bodies as they arrive, rather than after the entire request is received? Is there a way to use a custom HttpHandler
to do this? Perhaps with the asynchronous BeginProcessRequest() function? Has anyone here done asynchronous processing? Any help would be *greatly* appreciated!
J B. Podolak
Member
30 Points
6 Posts
Somebody must know the answer, please help: HttpHandler or HttpModule for file upload, large file...
Sep 27, 2002 02:18 PM|LINK
Somebody in this forum most have dealt with this issue, and I could really use some advice. Perhaps my last post was not worded correctly, here's a simplification: The built-in file upload handling features of ASP.NET load the entire request into server memory before you can save the file. If the file is large, this can cause execution timeouts, or at the very least, consume *huge* amounts of server memory. What I am looking for is a way to intercept an incoming request (asynchronously, I suppose) so that I can process the incoming bytes in smaller chucks, saving each chunk to the file as it is received, rather than waiting for the entire request to get loaded into server memory before processing. On the client side, I am using the standard <input type="file" /> tag, so the uploaded file(s) are sent in a multipart/form-encoded POST to the server. Has anybody dealt with processing incoming request bodies as they arrive, rather than after the entire request is received? Is there a way to use a custom HttpHandler to do this? Perhaps with the asynchronous BeginProcessRequest() function? Has anyone here done asynchronous processing? Any help would be *greatly* appreciated!