Learn R Programming

rdrop2 (version 0.6)

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 exipry.

Usage

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

Arguments

path
This is required The path to the new folder to create relative to root.
locale
Dropbox uses the locale parameter to specify language settings of content responses. If your app supports any language other than English, insert the appropriate IETF language tag. When a supported language is specified, Dropbox will returned translated s
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 auth

Examples

Run this code
drop_media('public/gifs/duck_rabbit.gif')

Run the code above in your browser using DataLab