Domain-specific upload functions for the four platform buckets. Each
enforces UUID validation, constructs the canonical key path, and
delegates to cdn_upload() / cdn_upload_dir().
Usage
write_art_coa(artist, artwork, local_path, delete_local = FALSE)
write_art_public(artist, artwork = NULL, local_path, delete_local = FALSE)
write_art_data(
artist,
artwork,
local_path,
prefix = NULL,
delete_local = FALSE
)
write_art_vault(
artist,
artwork,
local_path,
prefix = NULL,
delete_local = FALSE
)Arguments
- artist
Character(1). UUID of the artist.
- artwork
Character(1). UUID of the artwork (required where noted).
- local_path
Character(1). Path to a local file or directory.
- delete_local
Logical(1). Delete the local file after a verified upload. Defaults to
FALSE.- prefix
Character(1). S3 prefix (for art-data / art-vault).
Functions
write_art_coa(): Upload a certificate to art-coaWrites a single certificate file (PDF or JPEG) to
art-coaatissued/{artist}/{artwork}/.write_art_public(): Upload a thumbnail to art-publicWrites artist or artwork thumbnails to
art-publicatthumbnails/artist/{artist}.{ext}orthumbnails/{artist}/{artwork}.{ext}.write_art_data(): Upload processed assets to art-dataUploads a directory (or single file) into
art-dataatprocessed/{artist}/{artwork}/.write_art_vault(): Upload original bundle to art-vaultUploads a directory (or single file) into
art-vaultatuploads/{artist}/{artwork}/.
Examples
if (FALSE) { # \dontrun{
tmp <- tempfile(fileext = ".pdf")
writeLines("demo", tmp)
write_art_coa(
"11111111-1111-1111-1111-111111111111",
"22222222-2222-2222-2222-222222222222",
tmp
)
} # }
if (FALSE) { # \dontrun{
thumb <- tempfile(fileext = ".jpeg")
writeLines("jpeg-data", thumb)
write_art_public("abcd1234-abcd-1234-abcd-abcd12341234", local_path = thumb)
} # }
if (FALSE) { # \dontrun{
f <- tempfile(fileext = ".txt")
cat("hello", file = f)
write_art_data(
"11111111-1111-1111-1111-111111111111",
"22222222-2222-2222-2222-222222222222",
local_path = f
)
} # }
if (FALSE) { # \dontrun{
dir_tmp <- fs::dir_create(tmp <- tempfile("vault_"))
writeLines("canvas", file.path(tmp, "canvas.procreate"))
write_art_vault("11111111-1111-1111-1111-111111111111",
"22222222-2222-2222-2222-222222222222", tmp)
} # }