We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
David115
5 years agoExplorer | Level 3
SDK C# Read zip without downloading
Hi, I'm try to read the content of a zip in dropbox without downloading using c#. But I'can't do it. Is It possible?,
I read a xml file and images without downloading, but with a zip I don't know ...
- 5 years ago
No, unfortunately the Dropbox API doesn't offer the ability to list/download specific files from inside a zip archive stored on Dropbox, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
Greg-DB
Dropbox Community Moderator
5 years agoRegardless of the file type, to access file data via the Dropbox API v2 .NET SDK, you can use the DownloadAsync method. That will give you a IDownloadResponse you can use to access the file data via several methods. Exactly what you do with the data is up to you. You can save it to the local filesystem, for instance, but you are not required to. You could use GetContentAsStreamAsync to get a stream of the data and pass that directly to whatever you need to do with it instead, for example.
Here's some sample code that uses the stream to update an image in place, for example, instead of saving it locally.
In your case, it sounds like you'd need to pass it to some code that can handle zip data in place. That's a bit outside the scope of Dropbox API support though, so I can't offer much guidance on that exactly, but it looks like System.IO.Compression may support unzipping zip data from a stream.
David115
5 years agoExplorer | Level 3
Thanks you so much!!
Finally I can access to the content of the zip in Dropbox, but the problem that I've got now it's that with the DownloadAsync method I download the zip and I don't want to download it, I only want to access to some files inside the zip stored in Dropbox. Is it possible to access to this files without the DownloadAsync method, only with the route of the zip stored in my Dropbox?.
- Greg-DB5 years ago
Dropbox Community Moderator
No, unfortunately the Dropbox API doesn't offer the ability to list/download specific files from inside a zip archive stored on Dropbox, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!