Class Attachment
Represents a file attachment with its content, name, MIME type, and size.
Supported Image Formats: PNG, BMP, GIF, PSD, PIC, JPEG, PNM, HDR, TGA
public sealed class Attachment
- Inheritance
-
Attachment
- Inherited Members
Constructors
- Attachment(byte[], string)
Initializes a new instance of the Attachment class with the provided data and name. The data must represent one of the supported image formats:
- PNG
- BMP
- GIF
- PSD
- PIC
- JPEG
- PNM
- HDR
- TGA
- Attachment(string)
Initializes a new instance of the Attachment class by loading the content from the specified file path. The file must be one of the supported image formats:
- PNG
- BMP
- GIF
- PSD
- PIC
- JPEG
- PNM
- HDR
- TGA
Properties
- Length
Gets the length of the attachment content in bytes.
- Mime
Gets the MIME type of the attachment.
- Name
Gets the name of the attachment file.
Methods
- CreateFromBase64String(string, string)
Creates a new Attachment instance from a base64-encoded string.