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.
drop_upload(
file,
path = NULL,
mode = "overwrite",
autorename = TRUE,
mute = FALSE,
verbose = FALSE,
dtoken = get_dropbox_token()
)
Relative path to local file.
The relative path on Dropbox where the file should get uploaded.
- "add" - will not overwrite an existing file in case of a conflict. With this mode, when a a duplicate file.txt is uploaded, it will become file (2).txt. - "overwrite" will always overwrite a file -
This logical 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 new name can be obtained from the returned metadata. If false, the call will fail with a 409 (Conflict) response code. The default is `TRUE`
Set to FALSE to prevent a notification trigger on the desktop and mobile apps
By default verbose output is FALSE
. Set to TRUE
if you need to troubleshoot any output or grab additional parameters.
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 = "mtt.csv")
drop_upload("mtt.csv")
# }
Run the code above in your browser using DataLab