It was working few days back, uploading and displaying images to firebase. But now with every upload it gives me error with code 403
.
Here are my storage rules in firebase:
service firebase.storage {
match /b/{bucket}/o {
match /{userId}/{postId}/{fileName} {
allow write: if request.auth.uid == userId;
allow read;
}
}
}
PS: user is logged in while uploading and displaying images. It do not let me upload images either
Stuck, help required.
Resolved it myself by changing storage rules to public
Not a secure approach but resolved my error:
service firebase.storage {
match /b/your-app-name.appspot.com/o {
match /{allPaths=**} {
// Allow access by all users
allow read, write;
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.