Learn R Programming

rdrop2 (version 0.6)

drop_upload: Uploads a file to Dropbox using PUT semantics.

Description

This function will allow you to write files of any size to Dropbox(even ones that cannot be read into memory) by uploading them in chunks.

Usage

drop_upload(file, dest = NULL, overwrite = TRUE, autorename = FALSE,
  verbose = FALSE, encode = "multipart", dtoken = get_dropbox_token())

Arguments

file
Relative path to local file.
dest
The relative path on Dropbox where the file should get uploaded.
overwrite
Default behavior (TRUE) is to overwrite files in the destination. Set to FALSE to prevent this.
autorename
This value, either true (default) or false, determines what happens when there is a conflict. If true, the file being uploaded will be automatically renamed to avoid the conflict. (For example, test.txt might be automatically renamed to test (1).txt.) The
verbose
By default verbose output is FALSE. Set to TRUE if you need to troubleshoot any output or grab additional parameters.
encode
The file encoding
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
write.csv(mtcars, file = "mtt.csv")
drop_upload("mtt.csv")

Run the code above in your browser using DataLab