I am using Firebase and I try to create a reference to a Cloud Storage document in a Firestore document.
In my Console > Storage, I have a folder discovery
who contain a file heart.png
.
In my Firestore document, I have a reference
field named src
. I have tried to fill it with:
discovery/heart.png
gs://<NAME>.appspot.com/discovery/heart.png
<NAME>.appspot.com/discovery/heart.png
but it is doesn't work..
When I try to get the image like this src.get().then(snap => console.log(snap.data()))
the result is always undefined
.
Does the reference fields are only designed to the databases documents (not Storage ones) ? I can't find how to reference a Storage file in a Firestore document neither on the documentation nor on Google.
Could someone help me please ? :) Thanks a lot !