Attachment¶
-
class
pysnow.attachment.
Attachment
(resource, table_name)[source]¶ Attachment management
Parameters: - resource – Table API resource to manage attachments for
- table_name – Name of the table to use in the attachment API
-
get
(sys_id=None, limit=100)[source]¶ Returns a list of attachments
Parameters: - sys_id – record sys_id to list attachments for
- limit – override the default limit of 100
Returns: list of attachments
-
upload
(sys_id, file_path, name=None, multipart=False)[source]¶ Attaches a new file to the provided record
Parameters: - sys_id – the sys_id of the record to attach the file to
- file_path – local absolute path of the file to upload
- name – custom name for the uploaded file (instead of basename)
- multipart – whether or not to use multipart
Returns: the inserted record