I need help regarding to the Firestore and Firebase Storage.
At first before deploy i use command flutter run -d chrome all the firestore and firebase storage is functioning data, image or file is saved. but after deploy hosting , the firestore and firebase storage didnt save any data, image or file. i already deploy firestore, storage and hosting but still not working.
Here is the Firestore Rules
- Firestore Rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow read, write access to authenticated users for all documents
match /{document=**} {
allow read, write: if request.auth != null;
}
// Allow read access to the 'users' collection without authentication
match /Users/{userId} {
allow read: if request.auth == null;
}
}
}
- Firebase Storage Rules
rules_version = '2';
// Craft rules based on data in your Firestore database
// allow write: if firestore.get(
// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin;
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if false;
}
}
}
Im expecting the data of the firestore and storage will be saved in firestore after deploy hosting using firebase.
arief farhan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.