You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
frphotos
7 years agoExplorer | Level 4
c# Files.DownloadZipAsync, how do I get link from this Api call?
When I call this API endpoint "Api.Files.DownloadZipAsync", why am I not getting any link to the zip file?
Instead I am getting name, path_lower, path_display, id.
When I run it on the API explorer, it formed a link in the button below ... something like "blob:https://dropbox.github.io/e05a95ca-8ff7-473b-93ec-b339db391dde"
How do I form this download link?
Am I doing something wrong?
Below is my code snippet
using (var dbx = new DropboxClient(token)) { zipdownload = await dbx.Files.DownloadZipAsync("/fr_test"); }
- Greg-DBDropbox Staff
The DownloadZipAsync method will return the zip data directly to your app. It does not itself return a link to the data. You can have your app do whatever you want with it (e.g., serve it back to the user, save it locally, etc.). You can find an example of accessing the data here:
(That's an example of using DownloadAsync, but accessing the data works the same way for DownloadZipAsync.)
The API v2 Explorer, for instance, takes the returned zip data, and makes it available to the user via a blob URL directly in the browser. This isn't part of the API itself, but rather just something implemented in the API v2 Explorer itself as a convenience to developers using it to test the API.
- frphotosExplorer | Level 4
A quick question, I am using this Files.DownloadZipAsync inside a web application.
Once I obtain the data from "await response.GetContentAsStringAsync();"
How do I convert the stream data to be a physical url link like how the API v2 Explorer did via a blob URL?Any leads to an example or method resources would be great.
- Greg-DBDropbox StaffThe ability to create a blob URL is something native to browsers. You're writing in C#/.NET, outside of a browser, so this will work very differently.
Exactly how you do something like that will also depend on your scenario. For example, since you're building a web app, you can use your web framework to make the data available at some URL. That's outside of what I can help with as Dropbox API support, so I recommend referring to the documentation for the web framework that you're using.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 16 minutes ago
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 or Facebook.
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!