DotNetZip – Solving Mac Decompression Issues
Read OriginalThis article addresses a common problem when using the DotNetZip library in an ASP.Net Web API service: zip files downloaded on a Mac fail to extract, often creating .cpgz files instead. The root cause is setting the response ContentType to 'application/zip', which causes Safari and Mac's Archive Utility to mishandle the file. The solution is to change the ContentType to 'application/octet-stream', which prevents automatic decompression and allows standard extraction. The article provides code examples and explains the underlying issue, making it useful for developers working with zip file downloads in cross-platform environments.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet