好的,我有一个
Blob
我试图保存在本地磁盘上的文件
斑点
从本地创建
ArrayBuffer
). 我面临的问题是outlookformacos不想打开一个
FileSaverDialog
const blob = new Blob([body]); //body is an ArrayBuffer created locally
const link = document.createElement('a');
if (link.download !== undefined) {
const url = URL.createObjectURL(blob);
link.setAttribute('href', url);
link.setAttribute('download', fileName);
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
附言:
window.open(blob);
,但Outlook for macOS在这种情况下会抛出一个错误:
“没有要打开URL的应用程序集blob:https://..."
第2页:
我也试过使用
Office.context.ui.displayDialogAsync(url, { height: 100, width: 100, requireHTTPS: true });
,但仍然得到相同的错误。
我该怎么提示
SaveFileDialog
对于用户?先谢谢你
微软似乎正在为此开发补丁