cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK C# Read zip without downloading

SDK C# Read zip without downloading

David115
Explorer | Level 3
Go to solution

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 how to read the content.

Any one can share the code in c# or explain me in ditails how to do it?

Thanks!!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

Regardless 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
Explorer | Level 3
Go to solution

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-DB
Dropbox Staff
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    David115 Explorer | Level 3
What do Dropbox user levels mean?