无法在ajax调用中的新选项卡中查看html文件

问题描述

嗨,我正在从事React应用程序。我正在尝试在新标签显示文件文件源是蔚蓝的数据湖。下面是我的代码

 const config = {        
           path: `/Storage/getsastoken/?storageName=${storage}&containerName=${containerName}`,method: "GET",success: async (url: any) => {      do {
                 const containerURL: ContainerURL = new ContainerURL( url,StorageURL.newPipeline(new AnonymousCredential()));            
                       const listBlobsResponse = await containerURL.listBlobFlatSegment(Aborter.none,marker);     
                this.marker = listBlobsResponse.nextMarker;
                const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL,reportPath);
                window.open(blockBlobURL.url,"data:text/html;charset=utf-8");

我想在新选项卡中打开文件,但是文件总是下载而不是在新选项卡中打开。不确定文件本身是否有问题。 在天蓝色存储的文件属性中设置的属性下方

enter image description here

有人可以帮助我了解此问题吗?任何帮助将不胜感激。谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)