-
Notifications
You must be signed in to change notification settings - Fork 60
Cannot "Export for publishing" on macOS #458
Comments
If you were to do the same thing from the browser (https://script-lab.azureedge.net), does the issue occur there as well? Or is it only because it's an add-in. We use Thanks! |
@hongbo-miao , please take a look at the questions above. thanks! |
Just tried, both https://script-lab.azureedge.net and https://eligrey.com/demos/FileSaver.js succeed download the file. Tested on Safari 10.1.1 too. |
In that case, it might be a platform bug with agaves on Mac. Could you please file a bug and follow up with Dan or Julian? Thanks! |
@dsaunders45459 saw u self-assigned, let me know if still need notify Dan. BTW, may be related with eligrey/FileSaver.js#129 |
I thought this was an issue with Mac platform so I assigned to myself, but it seems to also repro on Safari. @hongbo-miao you can fix if you want if not a platform issue. |
@dsaunders45459 actually I am not sure what cause this since it works on my Safari. Please keep diging into it. |
I spent more time investigating this. Safari had the same bug before 10.1, the FileSaver library would not work for it. Mac Office uses the WebKit control to embed Script Lab, and it looks like it is not currently possible for the blob download approach FileSaver uses to work with this control using public WebKit API. An alternate approach could be to use window.open on a data-uri and base64 string for the contents, but FileSaver library does not do this. I have opened a bug in WebKit https://bugs.webkit.org/show_bug.cgi?id=174076 to enable blob downloads, but the fix will not be available in the foreseeable future. For now I think we should hide the button on the Mac platform, I will send out a pull request. |
@dsaunders45459 , another customer just ran into this same issue. Is there anything we can do at the platform side to make this work, after all? https://stackoverflow.com/questions/44922159/office-add-in-javascript-filedownload-not-working-with-mac/44932466?noredirect=1#comment76856056_44932466 |
@Zlatkovsky last I remember it wasn't a platform specific issue but the way Safari works itself esp with the 9.1/9.2 version. @Reezaali could you assist with this given that you had built a Add-in for the same earlier using multiple techniques. |
Here's the code sample that @WrathOfZombies was asking for: https://github.com/OfficeDev/Office-Add-in-JavaScript-FileDownload/blob/master/FileDownloadSampleWeb/Home.js |
Current Behavior
When I click "Export for publishing",
it shows this
Your Environment
The text was updated successfully, but these errors were encountered: