I'm writing a firebase function where i need storage location. Right now i have download url:
Is there a way to get Storage location like this:
gs://dexxxxxxxxxxxxxx.com/videosvideo:67423
from the given download url?
I'm writing a firebase function where i need storage location. Right now i have download url:
Is there a way to get Storage location like this:
gs://dexxxxxxxxxxxxxx.com/videosvideo:67423
from the given download url?
The description for refFromURl says that it returns a Reference and accepts:
A URL in the form:
1) a gs:// URL, for example gs://bucket/files/image.png
2) a download URL taken from object metadata.
Based on this, I'd expect the following to work fine:
const downloadUrl = "https://firestorage.googleapis...";
const gsUrl = firebase.storage().refFromUrl(downloadUrl).toString();