uploadProject.Rd
Upload a new version of a project, given a staging directory containing files and their metadata.
uploadProject(
dir,
url,
project,
version,
files = list.files(dir, recursive = TRUE),
...,
permissions = list(),
upload.args = list(),
complete.args = list(),
user.agent = NULL
)
String containing the path to a project directory on the file system, containing files to be uploaded.
String containing the URL to the REST API.
String containing the project name.
String containing the version.
Character vector of paths to files to be uploaded within dir
.
These should be relative to dir
.
Further arguments to pass to initializeUpload
.
A list containing permission information, see getPermissions
.
This usually contains the owners
and viewers
character vectors.
Further arguments to pass to uploadFiles
.
Further arguments to pass to completeUpload
.
String containing a user agent string.
If NULL
, a default user agent is used.
On success, NULL
is returned invisibly.
Use of this function will almost always require appropriate authentication/authorization with the target API.
Developers should ensure that identityHeaders
and friends are set accordingly.
Users should consider setting expires
in ...
when testing uploads, to avoid creating a permanent copy of test files.
Check out ?initializeUpload
for more details.
Advanced users can reduce upload bandwidth and storage footprint by creating links to duplicate files between versions or projects.
Check out ?initializeUpload
for more details.
uploadFiles
and related functions, for the internal utilities.
# Creating a mock project.
src <- system.file("scripts", "mock.R", package="zircon")
source(src)
tmp <- tempfile()
createMockProject(tmp)
# Performing a basic upload:
if (FALSE) {
uploadProject(tmp, example.url, "test-zircon-upload", "foobar", expires=1)
}