View source: R/upload_to_osf.R
upload_to_osf | R Documentation |
This function makes it convenient to upload a large number of files to an OSF project, particularly when there are many levels of nested sub-folders. It relies on the osfr package.
upload_to_osf(
project = "",
dir = ".",
skip_files = c(),
conflicts = c("error", "skip", "overwrite")
)
project |
An osf_tbl representation created with osfr::osf_retrieve_node() |
dir |
A file path to a first-level directory in your local project folder. e.g., "data". Do not specifiy second-level directories e.g., "data/raw". To upload files from the root project folder, specify dir = "." or leave out argument. |
skip_files |
An array of file/folder names and pattern strings to not include in the upload to OSF. e.g., you might have a folder of "old" scripts or data files that you do not want uploaded. |
conflicts |
This determines what happens when a file with the same name exists at the specified destination. Can be one of the following: - "error" (the default): throw an error and abort the file transfer operation. - "skip": skip the conflicting file(s) and continue transferring the remaining files. - "overwrite": replace the existing file with the transferred copy. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.