Firebase Storage Download

Tags firebase

Install gcloud command line utility

Windows
https://cloud.google.com/sdk/docs/install-sdk#windows

This will make a new “gcloud” command available your command prompt/terminal. The windows version also installs an app shortcut which launches a command prompt window and calls the “gloud init” command. Alternatively, manually launch the windows command prompt and enter “gloud init”.

Mac
https://cloud.google.com/sdk/docs/install-sdk#mac

Launch the Terminal and enter “gcloud init”

 

Authenticate

  • The gcloud init command will bring up a browser window and will prompt you to log into your google account to confirm access to the command line app.
  • From command/terminal window, select your Firebase project as the default project.
  • Your Firebase project ID can be found by clicking the gear icon on the top left of your project page and selecting "Project Setting" -> "General"

 

Download

From the Firebase web console, select "Storage" module.

If necessary, navigate to the subfolder that contains the files you wish to download and then click the "link" icon to copy the folder's path to the clipboard. Save this [FOLDER_PATH] for later.

Next, set up a folder on your computer to store the downloaded files. From the command prompt “cd” to the folder you just created (for example cd /Users/jane/desktop/myfiles) and then run the following:

gsutil -m cp -R gs://[FOLDER_PATH] ./

For example, if the project ID was "my-super-project" and the folder path was gs://my-super-project.appspot.com/audio/subject1

gsutil -m cp -R gs://my-super-project.appspot.com/audio/subject1 ./

Was this helpful?
0 reviews