pd_upload()uploads a local file or folder. It is the analogue ofgoogledrive::drive_upload().pd_put()uploads a file, or adds a new revision if a file of that name already exists. It is the analogue ofgoogledrive::drive_put().pd_update()uploads new content for an existing Proton Drive file, as a new revision. It is the analogue ofgoogledrive::drive_update().
New revisions keep the file's ID, sharing settings, and version history. The Proton Drive CLI skips uploads whose content is identical to the existing file.
Usage
pd_upload(
media,
path = NULL,
name = NULL,
overwrite = FALSE,
thumbnails = TRUE
)
pd_put(media, path = NULL, name = NULL, thumbnails = TRUE)
pd_update(file, media, thumbnails = TRUE)Arguments
- media
Path to a local file or folder.
- path
Destination folder, given as a path, an ID marked with
as_id(), or a one-row dribble. Defaults to/my-files.- name
Name for the uploaded file or folder. Defaults to the local name.
- overwrite
What to do if something called
namealready exists inpath. IfFALSE(the default) the upload fails. IfTRUE, a file is uploaded as a new revision of the existing file and a folder's contents are merged into the existing folder.- thumbnails
If
TRUE, the CLI generates preview thumbnails for images. Set toFALSEif thumbnail generation fails on your system.- file
The Proton Drive file to update, as a path, an ID marked with
as_id(), or a one-row dribble.
Value
A one-row dribble for the uploaded file or folder, invisibly.