Search code examples
office365office-jsoutlook-web-addinsofficedev

addFileAttachmentAsync fails in Outlook 2016 insider version 16.0.8201.2025


We develop an Outlook Office addin that calls addFileAttachmentAsync(url, filename).

The attachment download url points at our webapp with url like: https://serverhost/api/v1/contentlib/getResource?authToken=xxxxx&&resourceAbsUrl=yyyy&key3=val3

  1. This works as expected in Outlook 2016 desktop and Chrome browser (OWA). Attachment is downloaded from the server and added to email.
  2. Doesn't work in Outlook 2016 insider version 16.0.8201.2025
  3. Error msg: Download failed (under the attachment).

  4. When used fiddler (can also 'Open File Location' from the failed attachment dropdown menu) --> it seems Outlook requests the url without the query string. e.g https://serverhost/api/v1/contentlib/getResource

  5. The length of the url is below 2048 - the documented max.


Solution

  • This has been fixed in outlook builds after: 16.0.8408.1000 (see Outlook Add-ins Team - MSFT comment above)