Search code examples
node.jsdatabaseherokudropbox-apidropbox-sdk-js

Can I use Dropbox API v2 to implement cloud storage in my web app?


I was working on a web app where one of the feature was that a user logs into our system and then uploads some files. I was wondering if there is a way I could use my own Dropbox account to store these uploaded files in an organised and secured manner. I would also like to retrieve these files later on so I will need to store their links in a separate database at the moment upload is done. I am working on a node.js/JavaScript environment with Ubuntu if that matters and hosting the app on Heroku.

I think that the deprecated Datastore API had similar capability but is there a way to implement this with the API V2 ?


Solution

  • The Dropbox API does offer the ability to upload and download files, among other operations, so this should certainly be possible. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here:

    https://www.dropbox.com/developers

    It's important to note though that the Dropbox API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons. Most of these concerns are allayed for server-side apps though, where the access tokens can be kept secret.

    If you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)