本文介绍了类型"StorageMetadata"的值没有成员"downloadURL"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚将Firebase Storage更新为5.0.0,看来metadata.downloadURL()
不再被识别. (Value of type 'StorageMetadata' has no member 'downloadURL'
)
I just updated Firebase Storage to 5.0.0 and it looks like metadata.downloadURL()
is not recognized anymore. (Value of type 'StorageMetadata' has no member 'downloadURL'
)
尽管在查阅了文档后仍然可以使用它:
Though after looking in the documentation it should still be available :
该项目已清理&已经重建了.
The project was cleaned & rebuilt already.
我想念什么吗?
推荐答案
可以尝试
// Create a reference to the file you want to download
let starsRef = storageRef.child("images/stars.jpg")
// Fetch the download URL
starsRef.downloadURL { url, error in
if let error = error {
// Handle any errors
} else {
// Get the download URL for 'images/stars.jpg'
}
}
这篇关于类型"StorageMetadata"的值没有成员"downloadURL"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!