@@ -130,7 +130,14 @@ private async Task UploadAttachmentUnder3Mb(IFluentEmail email, Message draft, C
130130 {
131131 var attachment = new FileAttachment
132132 {
133- Name = a . Filename , ContentType = a . ContentType , ContentBytes = GetAttachmentBytes ( a . Data ) ,
133+ Name = a . Filename ,
134+ ContentType = a . ContentType ,
135+ ContentBytes = GetAttachmentBytes ( a . Data ) ,
136+ ContentId = a . ContentId ,
137+ IsInline = a . IsInline ,
138+
139+ // can never be bigger than 3MB, so it is safe to cast to int
140+ Size = ( int ) a . Data . Length ,
134141 } ;
135142
136143 await this . graphClient . Users [ email . Data . FromAddress . EmailAddress ]
@@ -146,7 +153,12 @@ private async Task UploadAttachment3MbOrOver(
146153 {
147154 var attachmentItem = new AttachmentItem
148155 {
149- AttachmentType = AttachmentType . File , Name = attachment . Filename , Size = attachment . Data . Length ,
156+ AttachmentType = AttachmentType . File ,
157+ Name = attachment . Filename ,
158+ Size = attachment . Data . Length ,
159+ ContentType = attachment . ContentType ,
160+ ContentId = attachment . ContentId ,
161+ IsInline = attachment . IsInline ,
150162 } ;
151163
152164 var uploadSession = await this . graphClient . Users [ email . Data . FromAddress . EmailAddress ]
0 commit comments