Skip to content

Can we get Attachment FileSize in IMessageSummary BodyPartBasic?? #1901

Answered by jstedfast
tinmac asked this question in Q&A
Discussion options

You must be logged in to vote

but this doesn't seem to reflect the actual filesize of the attachment as its byte size value is usually about 30% higher than the files in question, presumably meta data is in that octets value too? ie a 1.69MB attachment has an Octets value of 2429802 which is 2.43MB

BodyPartBasic.Octets is the size of the body part in its transfer encoded state (and not the size that it would be decoded).

I'll add a note to this effect in the documentation.

If Octets is unusable for this is there a way to get the attachment file size from a summary or do I have to download the message?

Unfortunately, there is not.

As you've discovered, though, base64 encoding data tends to result in a size that is …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tinmac
Comment options

@jstedfast
Comment options

Answer selected by tinmac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants