cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
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: 

What's the best way to share about 120 folders with some users who may not have Dropbox accounts?

What's the best way to share about 120 folders with some users who may not have Dropbox accounts?

Collaborator | Level 8

I need to create about 120 folders, put a small "readme.txt" file in each, and then share each folder, seperately, to about 120 different email addresses, ie: one folder per email address. Many users don't already have Dropbox or may not want to create an account. But also, many do.

 

I programatically check for new contents every couple of hours, which I do via a node api cronjob on Lambda, then copy the files out to where they need to be. Works great for those already using this system. 

 

"file requests" would be perfect for this, except that it puts the uploader's name against the file request, which messes up the filename.

 

I have a standard plan (not pro).

I am familiar with the Dropbox API, and can think of several ways of achieving this, but I need the RIGHT way!

I simply do not have time do do this manually - this is a volunteer-run service, and as all the data exists in a table anyway, looping that and using the API makes sense.

I am extremely unlikely to hit any limits.

I have the permission of each user, but some are quite old and get confused by the Dropbox signup process, but find file requests OK.

 

In case anyone is wondering why:

I provide a service for charities supporting blind people and the upload method that many of them currently use to get their files to me (old, clunky and nothing to do with me!) is going to be down for a week, which cuts them off from their service users. So I'm helping them fill the gap.

1 Accepted Solution

Accepted Solutions
Highlighted

Re: What's the best way to share about 120 folders with some users who may not have Dropbox accounts

Dropboxer
Dropboxer

There are a few types of sharing on Dropbox, and exactly what the best thing to do will depend on your particular use case, but I'm not sure I understand exactly what the requirements are here. Do you need to be able to share files to your users, or have them send files to you, or both?

 

If you just need to be able to share content to people who may not have Dropbox accounts, you'd need to use "shared links". This lets you get a shared link for any file or folder in your account, so you can send that link to anyone you want. The recipient doesn't need to have a Dropbox account to see the contents. This is a read/download-only kind of sharing though; the recipient can't make changes or use this to send files to you. On the API, the flow would look like this. For each folder that you need to send out:

  • Call /2/files/create_folder_v2 to create the folder, if it doesn't already exist
  • Call /2/files/upload to upload file(s) to the folder, or use any other means of uploading to your account, e.g., via the web site, desktop client, etc. like you mentioned
  • Call /2/sharing/create_shared_link_with_settings to create a shared link for the folder, or /2/sharing/list_shared_links to retrieve an existing shared link. (You only need to do this once per folder; the shared link for a folder doesn't change when you add or update the contents of the folder. Just don't delete the folder or revoke the shared link itself.)
  • Send the shared link to your recipient via whatever means you use (email, etc.).

If you do need them to be able to send files to you, still without them needing to have Dropbox accounts, then "file requests" would be the best option. There isn't a way to change that filename behavior though. You can use /2/file_requests/create to programmatically create file requests.

 

And if you need both, you could set up file requests and shared links for the same folders, that way, they could both see the contents and add more.

 

By the way, those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints. 

View solution in original post

2 Replies 2
Highlighted

Re: What's the best way to share about 120 folders with some users who may not have Dropbox accounts

Dropboxer
Dropboxer

There are a few types of sharing on Dropbox, and exactly what the best thing to do will depend on your particular use case, but I'm not sure I understand exactly what the requirements are here. Do you need to be able to share files to your users, or have them send files to you, or both?

 

If you just need to be able to share content to people who may not have Dropbox accounts, you'd need to use "shared links". This lets you get a shared link for any file or folder in your account, so you can send that link to anyone you want. The recipient doesn't need to have a Dropbox account to see the contents. This is a read/download-only kind of sharing though; the recipient can't make changes or use this to send files to you. On the API, the flow would look like this. For each folder that you need to send out:

  • Call /2/files/create_folder_v2 to create the folder, if it doesn't already exist
  • Call /2/files/upload to upload file(s) to the folder, or use any other means of uploading to your account, e.g., via the web site, desktop client, etc. like you mentioned
  • Call /2/sharing/create_shared_link_with_settings to create a shared link for the folder, or /2/sharing/list_shared_links to retrieve an existing shared link. (You only need to do this once per folder; the shared link for a folder doesn't change when you add or update the contents of the folder. Just don't delete the folder or revoke the shared link itself.)
  • Send the shared link to your recipient via whatever means you use (email, etc.).

If you do need them to be able to send files to you, still without them needing to have Dropbox accounts, then "file requests" would be the best option. There isn't a way to change that filename behavior though. You can use /2/file_requests/create to programmatically create file requests.

 

And if you need both, you could set up file requests and shared links for the same folders, that way, they could both see the contents and add more.

 

By the way, those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints. 

View solution in original post

Highlighted

Re: What's the best way to share about 120 folders with some users who may not have Dropbox accounts

Collaborator | Level 8

Thank you! 

 

It's people needing to share files with me - for now, I just went with a common File Requests folder, but this is interesting:

 

And if you need both, you could set up file requests and shared links for the same folders, that way, they could both see the contents and add more.

 

I hadn't realised that was possible, which is very useful. Thank you!

 

And sorry for late reply - looks like I didn't get the email notification.

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?