I am trying to create additional storage buckets in the new Firebase Cloud Storage Emulator. I see no option in the EmulatorUI and have found no resources online. Is this even possible?
Asked
Active
Viewed 218 times
1 Answers
0
You can create buckets in the Firebase emulator by following these steps:
1 Setup deploy targets for storage.
firebase target:apply storage default myproject.appspot.com
firebase target:apply storage other other.appspot.com
2 Configure the firebase.json file
Change the storage section to an array that looks like this:
{
"storage": [
{
"target": "default",
"rules": "storage.default.rules"
},
{
"target": "other",
"rules": "storage.other.rules"
}
]
}
Note that the bucket won't be created on the emulator suite until you write something to it. Also you need to change your project to the blaze plan to configure multiple buckets on the firebase console.
This URL has more details on the configuration:
https://firebase.google.com/docs/cli/targets#set-up-deploy-target-storage-database
This documentation page also has information on how to handle multiple buckets with the sdk:
https://firebase.google.com/docs/storage/web/start#use_multiple_storage_buckets

chemisax
- 193
- 1
- 7