How to set up Firebase storage

HOW TO SET UP FIREBASE STORAGE #

Choose Add project.

Next screen:

Enter your firebase project name (“Andromo app” in this example).

You can create up to 5 Firebase projects under the Google Cloud Platform quota.
You can request Google to increase this quota. See for details:
support.google.com/answer

Click Continue.

Disable Google Analytics.

Click Create project.

Wait while your project is being created.

Click Continue.

Enable Firebase Storage #

Click Continue.

Click Next. We will set storage rules a little bit later.

Select location for your Firebase Storage.

Multi-region locations #

A multi-region location is a general geographical area, such as the United States. Data in a multi-region location is replicated in multiple regions. Within a region, data is replicated across zones.

Select a multi-region location to maximize the availability and durability of your database.

Multi-region locations can withstand the loss of entire regions and maintain availability without losing data.

Note: this is copied from firebase docs.

Note: this says something about lower costs for Regional locations, but I couldn’t find any mentions about locations in the plan pricing.

Click Done. Wait while storage bucket is being created.

Here you can upload your files. You can group your files into folders. Now it’s the time change the storage access rules. Click Rules tab at the top.

Change your storage rules to allow all reads and to deny all writes:

rules_version = ‘2’;
service firebase.storage {
   match /b/{bucket}/o {
      match /{allPaths=**} {
         allow read;
      }
   }
}

Click Publish to apply the new rules.

Add Firebase Storage to your Android app #

Return to the Project Overview screen.

Fill the necessary information. Click Register app.

Click Download google-services.json and save google-services.json file.

Click Next.

Scroll down and click Next.

Click Continue to console.

Done!

If you ever lose track of your google-services.json file you can download it again anytime. Click the gear icon to the left of Project Overview button.

Click Project Settings and Scroll Down.

Click google-services.json to download the file again!

Check your app.

App status → storage → status should be unenforced.

Powered by BetterDocs

Leave a Reply

Your email address will not be published.

Hot summer sales!

Offer is valid for 100 packages till August 25

HOBBYIST

-25%*

use this promo code:

SummHobby

ULTRA

-32%*

use this promo code:

SummUl

PRO

-30%*

use this promo code:

SummPro

* – Discount percentage is calculated based on an annual subscription discount of 25% (20% for Hobbyist) with additional discount by a platform.