问题陈述:
Azure Microservice正在向客户端Web应用程序发送blob URL-" https://somestorageaccount.blob.core.windows.net/somecontainer/myfile.pdf&#34 ;.
我的努力:
能够使用chrome和firefox中的以下代码从url下载文件,而IE则在新选项卡中打开文件而不下载。
var link = document.createElement("a");
document.body.appendChild(link); //required in FF, optional for Chrome
link.download = fileName;
link.target = "_blank";
// Construct the uri
link.href = dataUrl;
document.body.appendChild(link);
link.click();
// Cleanup the DOM
window.URL.revokeObjectURL(data);
link.remove();
无法继续。