cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

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

Downloading a large shared folder

Downloading a large shared folder

tobiasjs
Explorer | Level 4

I'm trying to download a large scientific dataset (specifically: [link removed]) which is too large to form a zip file from. Somewhere in the directory hierarchy that becomes possible for each subdirectory, but I really don't want to manually find those points, download the zips, and reconstruct the original hierarchy.

 

It seems like this should be supported by the python API, and I'm happy (enough) to write code for this, rather than risk making mistakes doing it manually. However although it seems like you can get metadata for the shared link, you can't move from there to any sort of folder object that you can recurse. Similarly it doesn't seem to work to call sharing_mount_folder with the id returned by get_shared_link_metadata.

 

(Aside: It would be nice if the ids or the documentation for the API contained some namespace information, so that you could directly find out what you can do with a given id.)

 

Clicking Copy to Dropbox seems to time out, and I presume it wouldn't work anyway, given I don't have sufficient quota to make a copy of the data (Aside: I can't even tell how much quota I would need...)

 

Is there anything that I'm missing, or is this just an impossible task?

4 Replies 4

Greg-DB
Dropbox Staff

You can use the /2/files/list_folder and /2/files/list_folder/continue endpoints to list the contents of a shared links for folders. That's files_list_folder and files_list_folder_continue in the official Dropbox Python SDK. You can also use the API v2 Explorer to test/prototype these calls.

 

You would start by setting 'path' to the empty string '' and 'shared_link' to a SharedLink with 'url' set to the shared link. You can also make further calls with 'path' set to the relative path of any subfolder to list that nested folder level.

 

Note however that there's currently an issue causing such calls to fail if you're not using an access token for the account that owns the shared link. The team is working on resolving that though.

 

Then you can use /2/sharing/get_shared_link_file (sharing_get_shared_link_file) to download a file at any particular path relative to the linked folder.

tobiasjs
Explorer | Level 4

Thanks, that's pretty straightforward. Is there a public facing bug tracker that I can watch to determine when the issue is resolved, given that I can't generate an access token for the account that owns the data?

Greg-DB
Dropbox Staff

There isn't a separate public bug tracker for this. I'll follow up here once I have an update on that issue.

Greg-DB
Dropbox Staff

This should be fixed now. Please let us know if you're still seeing any issues.

Need more support?
Who's talking

Top contributors to this post

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