Thomas James
Thomas James

Reputation: 207

how to resolve Firebase image upload shows permission issues

I was trying to implement image upload using firebase storage. When I post the file via front end application its gives me an error,

error": {
"code": 400,
"message": "Permission denied. 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."

}

i have set the permission as below,

 rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}

can anybody know about this issue? I was trying for the past few days and I couldn't find the solution. I appreciate all your answers.

Upvotes: 0

Views: 2377

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599071

firebaser here

There was a problem with permissions on the default storage bucket for projects created in the past few days. This problem has been addressed a few hours ago, so should not be occurring in projects that you create from now on.

For any projects affected, you can fix the problem by following these steps:

  1. Go to https://console.cloud.google.com/storage/browser and select the affected project.

  2. Select the default bucket and click SHOW INFO PANEL

  3. Click the ADD PRINCIPAL buton in the right pane .

  4. Add [email protected] as the new principal,

  5. Grant the role Cloud Storage for Firebase Service Agent and click SAVE.

  6. Verify that the permission was successfully granted.

Upvotes: 4

Related Questions