Python Firebase
About Lesson

In this Python Firebase lesson we are going to learn about Python Firebase Cloud Storage, Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale. The Firebase SDKs for Cloud Storage add Google security to file uploads and downloads for your Firebase apps, regardless of network quality. You can use the SDKs to store images, audio, video, or other user-generated content. On the server, you can use Google Cloud Storage, to access the same files.

 

Note: make sure that you have enabled firebase storage in your firebase console.

 

First we create the storage object.

 

 

Using child just like with the Database service, you can build paths to your data with the Storage service, in here we want to upload an image to Firebase Cloud Storage.

 

 

The put method takes the path to the local file and an optional user token.

 

 

 

The download method takes the path to the saved database file and the name you want the downloaded file to have.

 

 

 

This is the complete code for this lesson.