Is it possible refFromURL()
is not working in local?
function deleteImage(imageUrl: string) {
let urlRef = firebase.storage().refFromURL(imageUrl)
return urlRef.delete().catch((error) => console.error(error))
}
When passing the following url:
http://localhost:9199/v0/b/xxx.appspot.com/o/images%2Fdemo%2FHWEGgAPDSZrtMzbil2MwM.image%2Fjpeg?alt=media&token=a7f798ee-056a-4f03-a7bf-8453b71077e6
I get the following error:
Uncaught FirebaseError: Firebase Storage: refFromUrl() expected a valid full URL but got an invalid one. (storage/invalid-argument)