Modified firestore rule for your setup:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /uploads/{userId}/{allPaths=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}
Try with this i hope it's useful
HAPPY CODING :)