11

I downloaded a Unity project that use images stored in Firebase server using the following link: https://zplayer360-86b30.firebaseapp.com

Now I want to reproduce this with my own file. I created a Firebase project using Firebase Console, uploaded manually the images, but now I click "copy folder url" button and it provide me only this link: gs://insidehome-29c9e.appspot.com/

I need a free HTTP public link. How can I obtain this?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
FabioDev
  • 694
  • 1
  • 12
  • 27

2 Answers2

26

When you upload a file to Firebase Storage, it automatically gets:

  • a Google Storage URL (starting with gs://), which you can use to access the file through the Firebase Storage SDK and the Google Storage API.
  • a download URL (starting with https://), which is a publicly-readable-but-non-guessable URL that you can use to download the URL with regular HTTP clients

What you're looking for is the second URL, which you can find in the Firebase Storage console when you select a file: enter image description here

At the bottom right you can see the download URLs for the file. One of these is auto-created when you upload the file, but you can create more of them or revoke existing ones.

I am not entirely sure what you mean by "free" URL. The link is publicly readable, but downloads will count against your Firebase Storage download quota of course.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thank you. But I don't need the URL of a single file but of an entire storage folder. Can you help me? – FabioDev Jan 25 '17 at 14:53
  • There is no way in Firebase Storage to access folder. See http://stackoverflow.com/questions/37335102/how-to-get-an-array-with-all-pictures/37337436#37337436 – Frank van Puffelen Jan 25 '17 at 15:10
  • 1
    I was looking just for the download url. After manually upload an image to storage from the firebase console, if you click the little blue "open image in a new window" icon, it will open a new tab with the image, and the https image download url will be in the url bar – Andrew Irwin Jul 15 '20 at 20:48
13

If there are no rules on Firebase storage. You are not protected.

Then it's publicly-readable-and-guessable, One can convert gs:// URL to https:// to download any file without Google SDK's.

https://firebasestorage.googleapis.com/v0/b/[projectID].appspot.com/o/[folderName]%2F[fileName]

Google Storage URL

gs://invitepeople-5d38c.appspot.com/profilePhotos/profile_1.jpg

Https downloadable URL

https://firebasestorage.googleapis.com/v0/b/invitepeople-5d38c.appspot.com/o/profilePhotos%2Fprofile_1.jpg?alt=media

Don't guess profile_2.jpg :)

Qamar
  • 4,959
  • 1
  • 30
  • 49