Learn R Programming

rdrop2 (version 0.8.2.1)

drop_media: Returns a link directly to a file.

Description

Similar to drop_shared. The difference is that this bypasses the Dropbox webserver, used to provide a preview of the file, so that you can effectively stream the contents of your media. This URL should not be used to display content directly in the browser. IMPORTANT: The media link will expire after 4 hours. So you'll need to cache the content with knitr cache OR re-run the function call after expiry.

Usage

drop_media(path = NULL, dtoken = get_dropbox_token())

Arguments

path

Path in the user's Dropbox, relative to root

dtoken

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.

References

API documentation

Examples

Run this code
# NOT RUN {
drop_media('Public/gifs/duck_rabbit.gif')
# }

Run the code above in your browser using DataLab