Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
One of my apps that i'm trying to migrate from API v1 to v2 uses the v1 functionality where you can download https://content.dropboxapi.com/1/files/auto/path/to/folder, and dropbox sends you a ZIP file so long as the contents of the folder are small enough.
Has the auto-zip functionality been completely removed in API v2 or is there some way to get that functionality?
thanks.
Hi Tim, API v2 doesn't offer zip folder downloads, but I'll pass this along as a feature request.
(Also, I'm not sure exactly what functionality you're referring to on v1, as there's no documented/supported zip folder download functionality on the /files endpoint you're referring to. Perhaps you're referring to the ability to download a zip from a shared link for a folder using the dl or raw URL parameters? That's unrelated to API version.)
Hi Tim, API v2 doesn't offer zip folder downloads, but I'll pass this along as a feature request.
(Also, I'm not sure exactly what functionality you're referring to on v1, as there's no documented/supported zip folder download functionality on the /files endpoint you're referring to. Perhaps you're referring to the ability to download a zip from a shared link for a folder using the dl or raw URL parameters? That's unrelated to API version.)
I may have a question in the same category or case! I use the premium version of Dropbox with my another business account with Dropbox. I am developing a portal for my client where I want to give my client an option to download bigger files like 5GB. So, what you think is it possible with v2 api to let my client download 5gb files at a time using direct download?
If no, what is the maximum limit of download zip at a time or how much file size can handle v2 api to download at a time?
@saifnirob Using /2/files/download, there isn't any file size limit for downloading individual files. (It also supports Range retrieval requests.)
The /2/files/download_zip endpoint, for downloading entires folders as zips, however, does have some limitations. You can find information on those in the documentation.
Okay. I am sharing this code for people who needs to download dropbox folder as zip in C#. I can't find a solution in the web and I have to piece up my own code. Hope it helps.
private async Task Download(string foldername) {
string token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; var dbx = new DropboxClient(token); using (var response = await dbx.Files.DownloadZipAsync("/" + foldername)) { Stream ms = await response.GetContentAsStreamAsync(); Int16 bufferSize = 1024; byte[] buffer = new byte[bufferSize + 1]; Response.Clear(); Response.ContentType = "application/x-zip-compressed"; Response.AddHeader("content-disposition", "attachment; filename=myfolder.zip"); Response.BufferOutput = false; int count = ms.Read(buffer, 0, bufferSize); while (count > 0) { Response.OutputStream.Write(buffer, 0, count); count = ms.Read(buffer, 0, bufferSize); } } }
//To call it, place the download function in a page_load of a aspx (example: download.aspx)
//Link example: http://domainname/download.aspx?folder=abc123
//This link will directly download the folder as a zip file.
protected void Page_Load(object sender, EventArgs e)
{
string dropbox_folder = Request.QueryString["folder"];
if (dropbox_id == null)
Response.Redirect("http://google.com");
try
{
var DownloadTask = Task.Run(async () =>
{
await Download(dropbox_folder);
});
DownloadTask.Wait();
}
catch (Exception ex)
{
Response.Redirect("http://google.com");
}
}
I am confused as to what the "version" is above this download_zip documentation (It says Version1 -- however it is on the Dropbox API v2 page.
Our apologies if the terminology is confusing.
We actually have two ways of versioning our API. One is the overall API version. The second (and the one you mention in your post) refers to the endpoint itself and has its own versioning.
In other words, you're using v2 of the overall API, but v1 of the download_zip endpoint.
Hi there!
If you need more help you can view your support options (expected response time for a 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!