We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
John E.5
11 years agoNew member | Level 1
How to let non-Dropboxer upload file or look at file from a particular 'Directory' using Ruby on Rails?
Hi, Currently I'm building a web apps that can let non-Dropboxer upload file or look at a file from a particular 'Directory'?
example:
+ My account has directory called 'ParticularDirectory'
+ Non-Dropboxer-1 upload 'file-1.txt' to 'ParticularDirectory'
+ Non-Dropboxer-2 upload 'file-2.odt' to 'ParticularDirectory'
+ Non-Dropboxer-3 look or download 'file-1.txt' & 'file-2.odt' from 'ParticularDirectory'
*Additional Question
=> Can Non-Dropboxer-4 upload file to 'ParticularDirectory/subDirectory1/file-3.jpg' when there is no 'subDirectory1' inside 'ParticularDirectory'?
Regards,
John
1 Reply
Replies have been turned off for this discussion
- Greg-DB11 years ago
Dropbox Community Moderator
This certainly sounds possible. The 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. However, most of these security concerns are allayed for web apps where you can keep the access token server-side.
So 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 app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)
You can upload files using the Dropbox API via your web app, e.g., using the
get_file
method in the official Ruby SDK:https://dropbox.github.io/dropbox-sdk-ruby/api-docs/v1.6.4/DropboxClient.html#method-i-get_file
You can upload files using using the
put_file
method:https://dropbox.github.io/dropbox-sdk-ruby/api-docs/v1.6.4/DropboxClient.html#method-i-put_file
You can even upload files to subfolders that don't exist yet and the subfolders will be created automatically.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,033 PostsLatest Activity: 7 years ago
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 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!