而且,Firebase how to get Image Url from firebase storage?
所以我的问题是否可以通过使用Firebase存储参考获取下载URL?我想通过提供来自存储的图像引用来获取图像下载URL。
提前感谢
// Create a reference to the file you want to download
let islandRef = storageRef.child("images/island.jpg")
// Download in memory with a maximum allowed size of 1MB (1 * 1024 * 1024 bytes)
islandRef.getData(maxSize: 1 * 1024 * 1024) { data, error in
if let error = error {
// Uh-oh, an error occurred!
} else {
// Data for "images/island.jpg" is returned
let image = UIImage(data: data!)
}
}