Attachments
Dealing with items attachments
Our common recommendation with attachments is to use them in moderation with a preference to documents in libraries and linking business objects items to that document using metadata and other logical relationship. But sometimes you need nothing more than just a simple binary addition to an item.
Working with attachments is mostly straightforward as you can only get a list of item's attachment, get a specific attachment by its name, add and delete an attachment.
Getting attachments
Attachments API provides little information, actually only FileName and ServerRelativeURL.
Items have attachments
To detect which items have attachments the corresponding Attachments
property can be requested within an ordinary get items request:
Adding attachments
Adding attachments is almost identical to adding documents to a document library.
Getting attachment by name
Attachment actions
With an attachment you can:
Download
Get reader (download in a stream way)
Delete
or Recycle
These actions are rather obvious with the help of the Fluent API.
Last updated