John John Thanks for the detailed explanation! CreateEntry fInformation. There's a few ways to deal wtih it: You can set the stream's AutoFlush property to true.
The reason for your problem is that the stream is buffered. Thanks in advance.įaraj Farook Faraj Farook Move zipStream. Any help would be highly appreciated as I'm struggling with this for a whole day. I'm using ZipArchive and the below is my code. how to repair any type of zip,rar file (100% working with proof)Īnd this error when I try to xtract from 7z But note that the files extracted from the 7z is not corrupted. But the downloaded file always gives the following corrupted error when opened in windows. ZipArchive gives Unexpected end of data corrupted error Ask Question. This post helped me: how to download a zip file using angular. I was also having problems with this and I found my issue was not the generation of the archive itself but rather how I was handing my GET request in AngularJS.
Or, since it's MemoryStream and you're using.
I'm trying to create a zip stream on the fly with some byte array data and make it download via my MVC action. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.