cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Check out the Dropbox cheat sheet for getting started in 2021 here!

Discuss Dropbox Developer & API

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

download_zip

download_zip

Explorer | Level 3

I have code that creates a zip archive folder from dropbox on the server https:confused face:/monosnap.com/file/PtMN0G6kepdzGaKa0CfOtj7htL4YUa
please tell me if I can immediately download this archive to the user's browser without storing it on the server?

5 Replies 5

Re: download_zip

Dropboxer

Your link is returning "404 Not Found", so I may not have full context here, but if you're making the Dropbox API calls on your server, you should be able to then return the information from the Dropbox API call down to the end-user of your site in their browser. Exactly how you do so will depend on your particular setup though, such your web framework, platform, and language. That's not specific to Dropbox though, so I can't provide exact instructions. I recommend referring to the documentation for your web framework, etc., for information on how to pass data back down to the user's browser.

Re: download_zip

Explorer | Level 3

Re: download_zip

Dropboxer

That link is also not working, but in any case, I imagine you're referring to using the /2/files/download_zip endpoint. That returns the zip data for the requested folder in the request body directly. If you want to then return that data directly to the browser accessing your server, you should refer to the documentation for your web framework, etc., for information on how to do so.

Re: download_zip

Explorer | Level 3

Re: download_zip

Dropboxer

That link is working. The endpoint URL is cut off, but it looks like you are referring to using /2/files/download_zip, and you're using curl to call it. I see you're setting 'CURLOPT_FILE' to send the result to a local file. You may want to use different curl options to put the result in memory instead of the local filesystem, and then pass that down to the browser using whatever web framework mechanism is available to you.

 

The curl library and whatever web framework you're using, if any, aren't made by Dropbox though so we can't provide support for those. I recommend referring to the documentation for those for information on configuring them.

Polls
Are you starting new work habits this year?

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?