Is there a way to change the default Firebase Storage Bucket?

Viewed 299

I know there are already similar posts about this topic but they do not cover it completely.

This one is the exact question I have but the answer is not about changing the default bucket but changing your app's config to use that bucket.

This one also has the same question but the answer is just about how to delete the bucket.

What I want is a way to change the default bucket so that any app I use from my firebase project will use this default bucket.

But if that wasn't possible, this is what I have tried so far:

  1. I have also tried to change the configuration file called google-services.json which inside you can change the storage_bucket key's value BUT my app still uses the default bucket when uploading files. (this is the method firebase support told me to do but it's not working and they said they did not provide flutter support)
  2. Then there is another method I googled which I think involves changing the whole app config by using Firebase.initializeApp() method but this one requires me to change the whole project id, bucket, and a bunch of other keys.
  3. If there is no way to fix this, I am thinking of deleting the default bucket, then hopefully the new bucket will take over that default spot.
1 Answers

Make sure that when you make changes to the google services file, you do flutter clean and pub get packages. Then it will take effect,

I had an issue with the firebase storage bucket and I wanted to change to a storage bucket from another firebase account. I did and make v=chages to the google services file but until I did flutter clean I was not able to see changes.

Related