My question is similar to this: Firebase web: Storage Location from 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
The answer given is to do:
const downloadUrl = "https://firestorage.googleapis...";
const gsUrl = firebase.storage().refFromUrl(downloadUrl).toString();
However, the context I'm doing this, is as a Firebase Function - so I need to use the Admin SDK.
The Admin SDK Storage directly references the the GCP Storage Buckets, which don't have refFromUrl()
.
Is there a simple way to do this? The context is - I want to delete the object for the given download link.