从给定的下载网址?解决方案 refFromURl 说,它返回参考并接受:A URL in the form:1) a gs:// URL, for example gs://bucket/files/image.png2) a download URL taken from object metadata.基于此,我希望以下各项能正常工作:const downloadUrl = "https://firestorage.googleapis...";const gsUrl = firebase.storage().refFromUrl(downloadUrl).toString();I'm writing a firebase function where i need storage location.Right now i have download url:https://firebasestorage.googleapis.com/v0/b/dxxxxxxxxx.com/o/videosvideo%3A67423?alt=media&token=acxxxxxxxxxxxxxxxxxIs there a way to get Storage location like this:gs://dexxxxxxxxxxxxxx.com/videosvideo:67423from 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.png2) 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(); 这篇关于Firebase网站:下载URL中的存储位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-03 03:25
查看更多