Creates and returns a shared link to a file or folder.
drop_share(
path = NULL,
requested_visibility = "public",
link_password = NULL,
expires = NULL,
dtoken = get_dropbox_token()
)
Path in the user's Dropbox, relative to root
Can be `public`, `team_only`, or `password`. If the password option is chosen one must specify the `link_password`. Note that for basic (i.e. free) Dropbox accounts, the only option is to publicly share. Private sharing requires a pro account.
The password needed to access the document if `request_visibility` is set to password.
Set the expiry time. The timestamp format is "%Y-%m-%dT%H:%M:%SZ"). If no timestamp is specified, link never expires
The Dropbox token generated by drop_auth
. rdrop2
will try to automatically locate your local credential cache and use them.
However, if the credentials are not found, the function will initiate a new
authentication request. You can override this in drop_auth
by
pointing to a different location where your credentials are stored.
# NOT RUN {
write.csv(mtcars, file = "mt.csv")
drop_upload("mt.csv")
drop_share("mt.csv")
# If you have a pro account, you can share files privately
drop_share("mt.csv", requested_visibility = "password", link_password = "test")
# }
Run the code above in your browser using DataLab