This is an updated stackoverflow repost: https://stackoverflow.com/questions/49825556/outlook-add-in-addfileattachmentasync-issues?noredirect=1#comment87779584_49825556
I'm having trouble with a web based outlook add-in when trying to add an attachment through the
addFileAttachmentAsync()
method. When the user triggers addFileAttachmentAsync()
they are getting the error
The attachment path is invalid
. I'm only having this issue with one domain through Outlook 2016 on a windows machine. If the user opens the add-in in OWA everything works correctly and the attachment is added. Also if I try it on other windows
machine of mine it works correctly.
I had the user test the path to the attachment in a browser and the file was accessible. So it doesn't look like its being blocked by a firewall or anti-virus software. However, when the user attempted to manually add the attachment through the add-in URL
it also fails and just states "The operation failed".
I'm thinking this has to be a configuration issue with their Outlook client, IE settings or OS config. I'm just not to sure which one, anyone have an idea to what may be causing this?
Environment: Outlook Client Version: Outlook 2016 MSO (16.0.4639.1000) 64-bit
Attachment File: plain old text (.txt) file
File Headers:
< HTTP/2 200
< date: Wed, 30 May 2018 00:07:36 GMT
< content-type: text/plain; charset=UTF-8
< content-length: 795
< x-powered-by: Express
< accept-ranges: bytes
< cache-control: public, max-age=0
< last-modified: Wed, 23 May 2018 12:32:25 GMT
< etag: W/"31b-1638cfc7465"
Sidenote: This is technically a separate issue but I'm also seeing another domain that is getting "There was an internal format error" but for this domain its only in O356 and not Outlook 2016. Oddly these are the only 2 domain
that are experiencing problems, otherwise it works flawlessly. Not expecting an answer on the second issue, just though it might help in narrowing down whats going on.