downloadAttachment.Rd
Downloads an attachment and returns it as a binary blob or saves it to disk.
downloadAttachment(
experimentId,
attachmentId,
destination = NULL,
overwrite = FALSE
)
if (FALSE) { # \dontrun{
# Returns the attachment as a binary blob:
attachment <- downloadAttachment(experimentId, attachmentId)
# Parse it as text:
readBin(attachment, character())
# Saves the attachment to disk:
downloadAttachment(experimentId, attachmentId, destination = "dir/file.txt")
# Use the byName helper to avoid finding the attachment ID:
downloadAttachment(experimentId, byName("file.txt"))
} # }