View source: R/downloadAttachment.R
downloadAttachment | R Documentation |
Downloads an attachment and returns it as a binary blob or saves it to disk.
downloadAttachment(
experimentId,
attachmentId,
destination = NULL,
overwrite = FALSE
)
experimentId |
ID of the experiment. |
attachmentId |
ID of the attachment. |
destination |
Optional. If specified, write the file to the specified path instead of returning it as a binary blob. |
overwrite |
Optional. If a destination is specified, allows destination file to be overwritten. |
## Not run:
# 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"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.