Upload a directory as a new versioned asset of a project in the registry.

uploadDirectory(
  project,
  asset,
  version,
  directory,
  staging,
  url,
  probation = FALSE
)

Arguments

project

String containing an existing project name.

asset

String containing a new or existing asset name in project.

version

String containing the name of a new version of asset.

directory

String containing the path to a directory to be uploaded. This should be inside staging for best performance, see allocateUploadDirectory for details.

staging

String containing the path to the staging directory.

url

String containing the URL of the gobbler REST API.

probation

Logical scalar indicating whether to upload a probational version.

Value

On success, NULL is invisibly returned.

See also

createProject, to create a new project for uploads.

versionPath, to obtain the path to a versioned asset's contents inside the registry.

fetchManifest, to obtain the manifest of the versioned asset's contents.

Author

Aaron Lun

Examples

info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start with a clean slate.
createProject("test", info$staging, url=info$url)

src <- allocateUploadDirectory(info$staging)
write(file=file.path(src, "foo"), "BAR")

uploadDirectory(
    project="test", 
    asset="simple", 
    version="v1", 
    directory=src, 
    staging=info$staging,
    url=info$url
)