Pretty much as it says: reject a probational upload of a version of a project's asset. This removes all files associated with that version.
rejectProbation(
project,
asset,
version,
staging,
url,
force = FALSE,
spoof = NULL
)
String containing the project name.
String containing the asset name.
String containing the version name.
String containing the path to the staging directory.
String containing the URL of the gobbler REST API.
Logical scalar indicating that the version should be forcibly rejected and removed if it contains invalid files.
If this needs to be set to TRUE
, users may need to call refreshUsage
afterwards to correct project-level usage statistics.
String containing the name of a user on whose behalf this request is being made.
This should only be used if the Gobbler service allows spoofing by the current user.
If NULL
, no spoofing is performed.
NULL
is invisibly returned upon successful rejection.
approveProbation
, to approve the probational upload.
uploadDirectory
, to specify probational uploads.
info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start with a clean slate.
createProject("test", info$staging, url=info$url)
# Mocking up an upload.
src <- allocateUploadDirectory(info$staging)
write(file=file.path(src, "foo"), "BAR")
uploadDirectory("test", "probation", "v1", src,
staging=info$staging, url=info$url, probation=TRUE)
listVersions("test", "probation", registry=info$registry)
#> [1] "v1"
# After rejection, the version disppears.
rejectProbation("test", "probation", "v1", staging=info$staging, url=info$url)
listVersions("test", "probation", registry=info$registry)
#> character(0)