ews-javascript-api
ews-javascript-api copied to clipboard
GetAttachment fails if id is passed as an argument
trafficstars
I need to load attachments by their IDs.
const attachmentId = ... // getting an attachment id somehow
exch.GetAttachment(attachmentId).then((res) => {
// expecting to get here
})
This code fails as I need to pass it an attachment structure or array of attachment structure. I think it would be nice if you add check for type of first argument - if it's a string or array of strings, use
ExtensionMethods_1.ArrayHelper.AddRange(request.AttachmentIds, attachments);
I believe this is due to missing "Operator Overloading" in javascript as compared to c#