小编Gen*_*sco的帖子

Firebase存储安全规则400错误问题"权限被拒绝.无法访问存储桶xxxxx - ****.appspot.com"

当我试图上传照片时,我的反应项目中我的firebase存储上传400错误导致消息错误消息错误...一切正常工作并成功上传图片,但现在它停止上传照片,发出以下错误,我不知道问题出在哪里......

提示检查的链接

POST https://firebasestorage.googleapis.com/v0/b/xxxxx-****.appspot.com/o?name=usertemp%2F0rdrGK4MRDRptAMCc3mHDveytJv1%2F0rdrGK4MRDRptAMCc3mHDveytJv1.jpg 400 ()
Run Code Online (Sandbox Code Playgroud)

这是链接响应的错误

{
  "error": {
    "code": 400,
    "message": "Permission denied. Could not access bucket xxxxx-****.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources."
  }
Run Code Online (Sandbox Code Playgroud)

这是我的安全

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth!=null;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

我仍然试图改变match/b/xxxxx-****.appspot.com/o与仍然没有成功

http-status-code-400 firebase-security firebase-storage

7
推荐指数
2
解决办法
5928
查看次数