【发布时间】:2019-11-06 13:19:54
【问题描述】:
我正在尝试在我的 Firestore 数据库中检索图片的可下载 URL。这是我的代码:
var storageRef = firebase.storage().ref();
storageRef
.child(`tutorials/images/${filename}`)
.getDownloadURL()
.then(function(url) {
this.setState({ imgURL: url });
console.log(url);
})
.catch(function(error) {
console.warn(error);
});
但我收到错误 RNFIrebaseStoragepromiseRejectStorageException 错误。任何人都可以解决如何从 Firestore 成功检索可下载 URL?谢谢。
【问题讨论】:
标签: react-native firebase-storage