Interface IAttachment
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
A list item attachment
public interface IAttachment : IDataModel<IAttachment>, IDataModelParent, IDataModelWithContext, ISupportModules<IAttachment>, IDataModelGet<IAttachment>, IDataModelUpdate, IDataModelDelete, IQueryableDataModel
- Inherited Members
- Extension Methods
Properties
All
A special property used to add an asterisk to a $select statement
object All { get; }
Property Value
FileName
Name of the attachment
string FileName { get; set; }
Property Value
FileNameAsPath
Name of the attachment as path
string FileNameAsPath { get; set; }
Property Value
ServerRelativePath
Server relative URL of the attachment as path
string ServerRelativePath { get; set; }
Property Value
ServerRelativeUrl
Server relative URL of the attachment
string ServerRelativeUrl { get; set; }
Property Value
Methods
GetContent(bool)
Get the content of this attachment.
Stream GetContent(bool streamContent = false)
Parameters
streamContentboolAlready return the content before all bytes are read, needed for large file downloads
Returns
- Stream
Stream containing the binary content of the attachment
GetContentAsync(bool)
Get the content of this attachment.
Task<Stream> GetContentAsync(bool streamContent = false)
Parameters
streamContentboolAlready return the content before all bytes are read, needed for large file downloads
Returns
GetContentBytes()
Get the content of the attachment.
byte[] GetContentBytes()
Returns
- byte[]
The binary content of the attachment
GetContentBytesAsync()
Get the content of this attachment.
Task<byte[]> GetContentBytesAsync()
Returns
Recycle()
Recycle this list attachment
void Recycle()
RecycleAsync()
Recycle this list attachment
Task RecycleAsync()