How to store "direct link" to an image using Firebase Storage

1

I need to access an image stored in Firebase Storage by a direct link, eg:

http://myfirebasehost.com/storage/imgIwant.png

As far as I know, this type of URL is only possible using the gs:// protocol, however, it is not accessible by link, only in the SDK api.

I need a solution exactly as I described above using the Firebase platform, if not possible, I accept other suggestions.

My code has constants that are links to images. It turns out that if I want to update this image, I will have to do a new deploy. Instead I want the image to update at the same URL. It would be impossible to do this with firebase (as far as I know) because the URL provided by Storage is not accessible by link.

Another alternative might be to convert an image to base64 and store it in the Database, but it would be too long and impractical.

    
asked by anonymous 05.08.2016 / 03:15

1 answer

0

I believe what you are looking for is Download URL (which can also be obtained from the Firebase console).

To avoid having to make update deploys, you can store this url in your database.

    
24.02.2018 / 10:58