Sunday, February 07, 2010

Large or asynchronous file uploads in ASP.NET MVC

The challenge of uploading large files in ASP.NET through HTTP is not a new challenge. It’s been covered extensively, by Jon Galloway, Stephen Walther, Milan Negovan and by one of the most active ASP.NET forum threads in history. In addition to handling large files, users often request an experience that shows the progress of an upload as it occurs. When you have either or both of these requirements, or if you simply need direct control of a stream of file data uploaded from a browser, you invariably hit the wall.

The vast majority of the conclusions reached on the best practice around large files and ASP.NET involve the following solutions:

   * Don’t do it; you’re better off embedding a Silverlight or Flash process on the page to move the file uploading process outside of the pipeline
   * Don’t do it; HTTP wasn’t designed for large file uploads, rethink your feature
   * Don’t do it; ASP.NET wasn’t designed to handle files larger than 2GB
   * Buy a commercial product like SlickUpload, that uses an HttpModule to stream a file in chunks
   * Use an open source product like NeatUpload, that uses an HttpModule to stream a file in chunks

Read more: dimebrain

Posted via email from jasper22's posterous