const file = new File([blobInfo.blob()], blobInfo.filename(), {
type: 'image/*',
})
new File
对象ie不支持问题;需要使用
new FormData()
替换
const formData = new FormData()
// 服务端接收文件的参数名,文件数据,文件名
formData.append('file', blobInfo.blob(), blobInfo.filename())
本文介绍了解决Internet Explorer浏览器中使用new File()构造函数的兼容性问题,通过使用FormData对象替代,确保了跨浏览器的文件上传功能正常运行。
1006





