I am trying to use DotNetZip 1.9 to read an uploaded zip file in Asp.Net MVC 3. I already verified that the HttpPostedFileBase object I receive is fine. I can save it to disk and then unzip it. However, saving to disk first seemed wasteful since I should be able to unzip from memory directly.
From MSDN, the HttpPostedFileBase.InputStream Property "gets a Stream object that points to an uploaded file to prepare for reading the contents of the file".
According to DetNetZip references, ZipFile.Read() can accept a Stream object. So I tried it and DotNetZip throws a BadReadException. I have attached screen shots showing the problem.
Problem unzipping from HttpInputStream
Value of the InputStream, Length matches that of the uploaded zip file
Help anyone? Thx