我有一个代码应该返回一个下载链接,但它不起作用,错误是它写得不正确。告诉我如何正确从 Firebase Storage 获取下载链接 Firebase Storage。
вот мой код:
private void button28_Click(object sender, EventArgs e) {
var task = new FirebaseStorage("*****-***.appspot.com")
.Child("data")
.Child("apps")
.Child("lols").GetDownloadUrlAsync();
MessageBox.Show(task.ToString());
}
最佳答案
要获取数据,必须使用 async-await 或 apply .then 来监听请求。
尝试这个方法
// Create a reference to the file we want to download
var starsRef = storageRef.child('images/stars.jpg');
// Get the download URL
starsRef.getDownloadURL()
.then((url) => {
// Insert url into an <img> tag to "download"
})
.catch((err) => {
console.log('err', err);
})
关于c# - Firebase 存储 : How to get a download link? C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67358182/