Web add-In: how to download base64 encoded content in outlook on mac?

Xeras 1 Reputation point
2022-09-26T17:13:19.693+00:00

I want to implement a web add-in feature to download base64 encoded data. This works for OWA and windows client, but does not work in outlook on mac.

Can you explain how to download any base64 encoded data in outlook on mac?

Tested variants

FileSave.js

   <IconButton  
     iconProps={<!-- -->{ iconName: 'Download' }}  
     onClick={() => {  
       FileSaver.saveAs(data, filename);  
     }}  
   />  

Works on windows and OWA, but not in outlook on mac.

   <a href={URL.createObjectURL(blobObject)} download={filename}>download</a>  

Works on windows and OWA, but not in outlook on mac.

   <a href={`data:;base64,${data}`} download={filename}>download</a>  

Works on windows and OWA, but not in outlook on mac.

openBrowserWindow

I also tried to open a browser windown containing a data url

   Office.context.ui.openBrowserWindow(`data:;base64,${data}`)  

or a url created by URL.createObjectURL()

   Office.context.ui.openBrowserWindow(`blob:https://localhost:3000/<uuid>`)  

URL.createObjectURL() should not work, because if the use defined an other default browser than safari, this link is invalid.

Additionally openBrowserWindow() only works with urls starting with http:// or https://. URLs starting with data: or blob: are not recognized and does not open a new new browser window.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,591 questions
0 comments No comments
{count} votes