drop_upload: Uploads a file to Dropbox.

Description Usage Arguments References Examples

View source: R/drop_upload.R

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

1
2
drop_upload(file, path = NULL, mode = "overwrite", autorename = TRUE,
  mute = FALSE, verbose = FALSE, dtoken = get_dropbox_token())

Arguments

file

Relative path to local file.

path

The relative path on Dropbox where the file should get uploaded.

mode

- "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 -

autorename

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'

mute

Set to FALSE to prevent a notification trigger on the desktop and mobile apps

verbose

By default verbose output is FALSE. Set to TRUE if you need to troubleshoot any output or grab additional parameters.

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

1
2
3
4
5
## Not run: 
write.csv(mtcars, file = "mtt.csv")
drop_upload("mtt.csv")

## End(Not run)

rdrop2 documentation built on Sept. 30, 2017, 1:02 a.m.

Related to drop_upload in rdrop2...