drop_media: Returns a link directly to a file.

View source: R/drop_media.R

drop_mediaR Documentation

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

## Not run: 
drop_media('Public/gifs/duck_rabbit.gif')

## End(Not run)

karthik/rdrop2 documentation built on March 28, 2024, 5:51 a.m.