【发布时间】:2018-10-21 20:56:48
【问题描述】:
在尝试上传照片时,我不断收到来自 firebase 链接的消息错误,说我的 react 项目中的 firebase 存储上传出现 400 错误...之前一切正常并成功上传图片,但现在它停止上传照片给以下错误,我不知道问题出在哪里...
inspect中提示的链接
POST https://firebasestorage.googleapis.com/v0/b/xxxxx-****.appspot.com/o?name=usertemp%2F0rdrGK4MRDRptAMCc3mHDveytJv1%2F0rdrGK4MRDRptAMCc3mHDveytJv1.jpg 400 ()
这是来自链接响应的错误
{
"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."
}
这是我的安全
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}
我仍然尝试将 match 更改为 /b/xxxxx-****.appspot.com/o 仍然没有成功
【问题讨论】:
标签: firebase-storage firebase-security http-status-code-400