Learn R Programming

osfr (version 0.1.1)

upload_files: Upload a file to OSF (both new and revised)

Description

Upload a file to OSF (both new and revised)

Usage

upload_files(id, path, dest = NULL)

Arguments

id

OSF id (osf.io/XXXXX; just XXXXX) to upload to. Specify a project id to upload a new file. Specify a file id to upload a revised file.

path

Path to file on local machine to upload.

dest

Name of the destination file on OSF (if NULL, basename(path) will be used). Note that this can be used to specify what folder to place files in, e.g. 'my_folder/file.png'. Also note that if id is a file ID, this is not necessary.

Value

Link to new file if a new file is created

Examples

Run this code
# NOT RUN {
upload_files(id = "12345", path = "test.pdf")
upload_files(id = "12345", path = "test.pdf", dest = "my_folder/test.pdf")
# }

Run the code above in your browser using DataLab