IE 11无法从Angular中的字节数组创建文件对象

问题描述 投票:0回答:1

谁能告诉我IE11为什么会引发错误在其他仅在IE中工作的浏览器中,出现错误“对象不支持此操作”]

let file = new File([files], newFileName, { type: Constants.FILECONTENTTYPE, lastModified: Date.now() });
                let uploadDocument = new UploadDocument();
                uploadDocument.fileName = newFileName;
                uploadDocument.fileItem = file;
                this.fileList = [];
                this.mergedFileList.forEach(fileItem => {
                    this.fileList.push(fileItem);
                });
javascript angular internet-explorer-11
1个回答
0
投票

您需要将import 'core-js/es6/object';添加到polyfill.ts文件中。

© www.soinside.com 2019 - 2024. All rights reserved.