-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
The associated forum post URL from https://forum.rclone.org
I've not created a forum post, but this feature has been discussed with varying degrees of accuracy at:
- closed as impossible Using rclone to access (anonymously) a shared dropbox folder #5864
- closed as implemented (but misses shared folder vs shared link distinction, I think) Sync from shared links #862
- I see a call to
o.fs.sharing.GetSharedLinkFilein this PR but it doesn't look (to me) like it is handling the case of being passed a shared link, exactly. dropbox: add support for viewing shared files and folders #4527 - forum post from @ncw indicating that the --dropbox-shared-xxx options don't solve the shared-links case. https://forum.rclone.org/t/how-to-use-dropbox-shared-folders/27398/6
What is your current rclone version (output from rclone version)?
rclone v1.59.1
- os/version: debian bookworm/sid (64 bit)
- os/kernel: 6.0.0-1-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: none
What problem are you are trying to solve?
It appears that rclone has no way to read/pull files that have been shared by a third party as "Shared Link"s (where a publically-accessible link is created), as opposed to "Shared Folders" and "Shared Files" which are shared to specific user accounts and appear in the "Shared" listing for that user, and may be mounted to their dropbox area and accessed with --dropbox-shared-[folders|files].
These shared links do not appear in one's own dropbox account as shared folders, and when accessing their URLs in a browser, the only options presented are to "Download" (which will serve a zip file of the entire shared file/folder), or "Save to Dropbox" which creates a local copy of the share in one's own dropbox account, which is detached from the original share, uses one's own quota and won't be updated with changes from the original source.
Here's a working example of such a shared link: https://www.dropbox.com/sh/o4p5od3yzzj7384/AADovh3gpXiPyPoygeB6Cwi1a?dl=0
Which renders like this, regardless of whether one is logged in or anon:

Most reports and answers I have found either deal with shares to a user, which will appear in the shared items listing, or suggest changing to a share method that does this, or state that it cannot be done 1. I found this potential solution via a 7 year old SO answer at https://stackoverflow.com/questions/34107525/getting-list-of-files-and-folders-in-public-dropbox-folder-and-downloading-files
How do you think rclone should be changed to solve that?
The API specifies methods for /get_shared_link_metadata and /get_shared_link_file which I believe will provide the required features. It looks like these endpoints are present in the go api as well, and I couldn't find any existing use of them in the rclone repo other than the one use mentioned above.
I'm not experienced with the dropbox api nor rclone's codebase, but it looks to me like the get_shared_link_metadata endpoint can be passed the raw URL of the shared link, and the response may(?!) contain an ID for the object, which I assume can then be used to access the folder/file.
I would envision an option could be added (--dropbox-shared-link perhaps?) which would allow specifying the shared link url in a way similar to the http remote, providing a read-only remote that can be listed and pull-synced. eg:
rclone lsd --shared-link-url https://www.dropbox.com/sh/o4p5od3yzzj7384/AADovh3gpXiPyPoygeB6Cwi1a?dl=0 :dropbox:
or
rclone lsd dropboxremote:https://www.dropbox.com/sh/o4p5od3yzzj7384/AADovh3gpXiPyPoygeB6Cwi1a?dl=0 --dropbox-shared-link
(whichever is more in line with rclone's style).
Currently the documentation does not seem to mention the specific "shared link" style of dropbox sharing which seems to be an on-going point of confusion for others trying to find a similar solution, as the "shared-files"/"shared-folders" modes are distinctly different from a "shared-link" case.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.