None
download_attachment_to_file(int
entity_id, string
file_path)
Saves the binary content of the specified attachment to the specified file path. If the file already exists, it will be overwritten. The script must have read and write permissions to the file path.
int
entity_id (required)
The id of the Attachment to download.string
file_path (required)
The path of the file to download to.
None
# ----------------------------------------------
# Download Attachment to a file
# ----------------------------------------------
attachment_id = 12
file_path = "/tmp/attachment.jpg"
sg.download_attachment_to_file(attachment_id, file_path)
example output:
None