js 在iphone手机中 blob转file 报错FileConstructor is not a constructor

接口需要前端传一个file图片文件 我在前端将图片压缩后得到一个 blob类型 但是我将blob转为file 中在个别iphone中 报错 FileConstructor is not a constructor

代码:

//将blob转换为file
        function blobToFile(theBlob, fileName){
            var f = new File([theBlob], fileName, {type: "image/png", lastModified: Date.now()});
            return theBlob;
        },

请问大佬们这个问题有什么办法解决么

阅读 3.3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题