We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
quocvu
9 years agoExplorer | Level 3
Best way to get a file's URL
There are photos in shared folder that I have access to. I would like to get the URL of the photos (the JPEG/PNG) in that folder using the V2 NodeJS API. I am able to enumerate the files in the ...
quocvu
9 years agoExplorer | Level 3
Thanks Greg. Can I do that even though I am not the owner of the shared folder?
Can you explain what is the use of the id (of files or folders) returned by filesListFolder(). I believe when the argument is specified as path, we are talking about this: <folder name>/<folder name>/<filename>
Then what is the path if we are within a shared folder? is that shared folder considered to be the root?
Greg-DB
Dropbox Community Moderator
9 years agoYes, you can use these methods for files/folders inside a shared folder even if you are not the owner of the shared folder. As long as you are a member of the shared folder, the contents will exist in your account for you to use, the same as you can see on the website.
The 'id' for a file/folder is just another way to identify a particular item. Some API endpoints support supplying a file ID instead of a file path. The advantage to a file ID is that it doesn't change when a file is moved, for example.
Whether or not a file is in a shared folder, the path is relative to the root that your app can see. That is the root of the Dropbox itself for apps with the "full Dropbox" permission, and the app folder for apps with the "app folder" permission. The paths for items are included in the Metadata objects for those items, e.g., as returned by filesListFolder.
The 'id' for a file/folder is just another way to identify a particular item. Some API endpoints support supplying a file ID instead of a file path. The advantage to a file ID is that it doesn't change when a file is moved, for example.
Whether or not a file is in a shared folder, the path is relative to the root that your app can see. That is the root of the Dropbox itself for apps with the "full Dropbox" permission, and the app folder for apps with the "app folder" permission. The paths for items are included in the Metadata objects for those items, e.g., as returned by filesListFolder.
About 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!