Constructor MailDraftAttachment
- Namespace
- MailFathom.Domain.Delivery.Drafts
- Assembly
- MailFathom.Domain.dll
MailDraftAttachment(MailDraftAttachmentId, string, string, long, DateTimeOffset)
Describes one file staged against a draft, without the octets it is made of.
public MailDraftAttachment(MailDraftAttachmentId Id, string FileName, string MediaType, long ByteLength, DateTimeOffset StagedAt)
Parameters
IdMailDraftAttachmentIdWhat a removal names the file by.
FileNamestringThe name the recipient will see the file under.
MediaTypestringThe media type the author declared the file as.
ByteLengthlongHow many octets were stored for it.
StagedAtDateTimeOffsetWhen the upload was taken in, which is the order a composition attaches the files in.
Remarks
A file is uploaded once and composed into every later revision of the draft, which is what keeps editing a message with a large attachment from re-sending that attachment on each keystroke. So it is held beside the draft rather than inside the composed message, and the message the drafts folder shows is the composition of the fields and these.
The description travels apart from the content for the reason every other mail description does: listing a draft says what is attached to it, and a listing that carried the octets would load every file of every draft to answer what they are called.
MediaType is the author's statement about their own file rather than anything derived from it, on the same terms as the composed attachment: what a wrong one costs is a recipient's client opening the file with the wrong application, which is the author's mistake to make and to correct.