cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

Create download zip package

Highlighted

Create download zip package

Helpful | Level 5

Hello

 

I'm accessing the API via a PHP library. I want to do two things, and need to know if its possible:

 

1) We have files in 2 folders that I would like to be able to have our clients download with a single click - for instance, if we have the folders below, we would want to download Job1\Part A and Job1\Part B. Simplest if this could be shown as a URL that clicks and the download happens. Is this functionality in the API? All these directories are already shared with the clients.

 

Job1

Job1\Part A

Job1\Part B

Job1\Part C

Job1\Part D

Job1\Results

 

2) Is there an embed that can be set to upload only - in the example above, the client would process Part A and Part B and upload into Results. If not, what's the suggested way to allow multiple file upload into a directory?

 

Thanks.

 

 

 

 

2 Replies 2
Highlighted

Re: Create download zip package

Dropboxer

1) To download any specific file, you can use the /2/files/download endpoint, and to download any specific folder and its contents as a zip, you can use the /2/files/download_zip endpoint. These will require one API call per file or folder, respectively though. There isn't a way to bundle multiple different files or folders into a single API call. (Depending on your setup/environment you may be able to perform the multiple calls necessary and handle the results automatically in your UI, but I can't provide guidance on that aspect of your app.)

 

2) To upload a file, you can use the /2/files/upload endpoint (or upload sessions for large files). That's not something that gets "embedded" in your app exactly, but rather just another API call that your app can make. From your description, it doesn't sound like any of the Dropbox pre-built components (the Dropbox Chooser, Saver, or Embedder) do quite what you need but please feel free to elaborate and I'll be happy to pass this on as a feature request if not.

Highlighted

Re: Create download zip package

Explorer | Level 3

Thanks. Looks like I'll make do with a link to the shared folder(s) and they can download from that. I hoped to be able to create this bundle at the DB end. I could bring the files to our server and do the work there, but these could be large files, and the whole point of using DB is to keep the file activity on your servers.

 

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?