Ionic 3 文件插件错误安全错误。

Sha*_*ani 5 javascript file typescript ionic-framework ionic3

我正在尝试读取以上传从存储读取的文件到 firebase。将文件作为数组缓冲区读取时出现此错误

{"code": 2, message:"SECURITY_ERR"}
Run Code Online (Sandbox Code Playgroud)

这是代码

 this.file.readAsArrayBuffer(dirPath,url.name).then((buffer)=>{
        // this.upload(buffer,url.name);

        let blob = new Blob([buffer],{type:'image/jpeg'})

        alert(blob);

        firebase.storage().ref('files/'+url.name).put(blob).then((d)=>{
          alert(JSON.stringify(d));
        }).catch(e=>{
          alert(e);
        })
    }).catch(e=>{
      alert(JSON.stringify(e));
    })
Run Code Online (Sandbox Code Playgroud)

我还添加了所有这些权限 READ_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE