小编Sha*_*ani的帖子

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

我正在尝试读取以上传从存储读取的文件到 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

javascript file typescript ionic-framework ionic3

5
推荐指数
0
解决办法
266
查看次数

需要帮助以角度4发送此卷曲请求

我有这个curl命令

curl -X POST \
https://www.wellingtonsoccer.com/lib/api/auth.cfc?returnFormat=JSON&method=Authenticate' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: b408a67d-5f78-54fc-2fb7-00f6e9cefbd1' \
-d '{"email":"myemail@xyz.com",
"user_password":"mypasss",
"token":"my token"}
Run Code Online (Sandbox Code Playgroud)

我想以与该curl请求相同的角度4发送http发布。

json curl http angular

3
推荐指数
1
解决办法
4338
查看次数

标签 统计

angular ×1

curl ×1

file ×1

http ×1

ionic-framework ×1

ionic3 ×1

javascript ×1

json ×1

typescript ×1