I have an Outlook add-in that identifies if the email being read has any attachments, and prompts the user to action against them if they wanted. The action manipulates the file, and then wants to save it... somewhere for the user to be able to now view.
In Outlook Web (https://outlook.office.com) I am able to trigger a browser download (chrome, ff, and safari), but this is not an option in Outlook for Mac. (I assume the same for windows.)
I don't know how to create and save a file when in Outlook for Mac or Windows clients.
I also do not have the ability to addfileAttachmentFromBase64Async() when in read command surface. If that were present, I could attach the manipulated file... to then be viewable by clicking on it.
Is this possible? Has anyone figured any creative workaround to saving a file on a desktop client from an outlook add-in?
Edit: Thanks to the assistance of @OutlookAdd-insTeam-MSFT in the comments below so far I have been able to utilize window.open() from my add-in in this way.
openNewWindow(): void {
const wnd = window.open('data:application/octet-stream;base64,' + base64Image);
setTimeout(function() {
wnd.close();
}, 3000);
}
Again, though, this will download/save a file when in OWA, but does not in Outlook for Mac/Windows. It will open the window, but no file will save/download.
I suspect there may be potential combination answer here with window.open() and one of these solutions? How to save a file in Outlook from Add-in [taskpane or otherwise]?
A big issue with this Desktop client limitation [other than it's not working the way I require to deliver my add-on], is that I have also not found a way [in the manifest for the add-in or otherwise] to limit my Add-in from being available on the Desktop Clients [where it would not currently work].