React native 在React Native中从Firebase存储获取映像

React native 在React Native中从Firebase存储获取映像,react-native,firebase-storage,React Native,Firebase Storage,我正在尝试在react native中显示firebase存储映像。我设法将图像写入firebase存储,但现在我也想在应用程序中显示它。不幸的是,我试图理解文档却没有成功。有人能帮我吗 我尝试的是让用户上传一个图像,然后它应该显示为一个图像。已成功上载,请在此处查看我的firebase存储: 现在,我正在尝试从firebase存储中获取图像,并使用以下代码显示它: componentDidMount(){ this.imageUploaded = firebase.stora

我正在尝试在react native中显示firebase存储映像。我设法将图像写入firebase存储,但现在我也想在应用程序中显示它。不幸的是,我试图理解文档却没有成功。有人能帮我吗

我尝试的是让用户上传一个图像,然后它应该显示为一个图像。已成功上载,请在此处查看我的firebase存储:

现在,我正在尝试从firebase存储中获取图像,并使用以下代码显示它:

  componentDidMount(){    
  this.imageUploaded = firebase.storage().ref('images/profilepictures/536887a2-c8fe-4c60-b2f1-3864f691fa9e.jpg').getDownloadURL().toString();

    console.log(this.imageUploaded);
  }
但是,
console.log(this.imageupload)
=
[object object]
的结果在图像中保持空白:

<Avatar size="large" rounded source={{uri: this.imageUploaded }} onPress={() => console.log("Works!")} activeOpacity={0.7} />
console.log(“Works!”)}activeOpacity={0.7}/>
没有显示任何内容。有人能帮我理解这一点吗?提前非常感谢

变化

  this.imageUploaded = firebase.storage().ref('images/profilepictures/536887a2-c8fe-4c60-b2f1-3864f691fa9e.jpg').getDownloadURL().toString();
    console.log(this.imageUploaded);

希望这有帮助

var ref = firebase.storage().ref('images/profilepictures/536887a2-c8fe-4c60-b2f1-3864f691fa9e.jpg');
this.imageUploaded = await ref.getDownloadURL();