Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Nico W.2's avatar
Nico W.2
New member | Level 1
11 years ago

Using Dropbox to automatically upload images to a website.

Hello, I am very new at Dropbox API development and i require some help. I am currently building a website for a colleague, and they would like to be able to upload new files to the website automatically without having to contact one of webmasters. I am thinking it would be possible to use the Dropbox API or the Dropbox Chooser, so that the user can put files in a Dropbox and they would be automatically uploaded to the website. However I have never done any development with Dropbox API or Chooser before, and I am at a loss for if this is possible or how to accomplish it. Any help or pointers in the right direction would be greatly appreciated. Thank you very much.

1 Reply

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    That certainly would be possible, using either the Core API or Chooser.

    If you want a more automatic flow, you can use the Core API . First, you'd need to register an app. You can find information on the different permissions here. For this, the app folder permission would likely be sufficient, unless you want the user to be able to specify a different folder.

    Then, you'll need to implement the app authorization flow. The OAuth guide should be helpful there. We also highly recommend using one of the official SDKs, if possible, as they'll do most of the work for you.

    Once the user is linked to your app, your app can use the /files (GET) API call to access file content from the user's account.

    You can also use webooks to get low-latency notifications of changes to linked user accounts, so you would know when to download files. There's a sample app linked on that page that overlaps a bit in functionality here.

    Alternatively, you could use the Chooser, but it would require a bit more manual intervention from the user. That is, they would need to go to the website, trigger the Chooser, and select the file(s) to send. (As opposed to the Core API implementation above, where the user would just need to drop files into the app's folder on any linked device, which could even be automated.) Using the Chooser would likely be easier to develop though.

    If you did go the Chooser route though, the basic idea would be to use the "direct" link type, and send that link to your server, where you could make a network request to download the file from the link.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

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!