outlookoffice-jsoutlook-web-addinsjavascript-api-for-office

How to upload outlook email attachments on my cloud server using Outlook Js Add-in


I am developing outlook javascript add-in using vs2017. I have created a sample application to find attachments from outlook mail item. Here, While getting attachments from Exchange Server, It returns 200 OK.

I have my own cloud application looks like google drive. I want to upload outlook mail attachments on my cloud server using POST API call. API call was running successfully. But I am not able to get file content from the exchange server.

I have added some sample code over here.

Please help me to get attachments from outlook mail and upload on my cloud server.


Solution

  • attachment._data$p$0 gives to attachment metadata. Get id from there and use getAttachmentContentAsync API to get the attachment content Documentation