Name
wslists.AddAttachment (listName, listItemID, fileName, attachment)
Synopsis
Adds a file attachment to a row in a SharePoint list. Returns the address of the attachment.
|
Argument |
Data type | |
|
Settings |
|
String |
|
The name or GUID of the list. |
|
String |
|
The ID of the row to attach the file to. |
|
String |
|
The name of the file to attach. This name is used to identify the attachment on the server. |
|
Byte( ) |
A byte array containing the file to attach. Uses base-64 encoding.
The ID of a row is not the same as the index of the row within the list. SharePoint assigns a unique ID to each row as it is added. Since rows can be added and deleted throughout the life of the list, IDs may not be contiguous.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access