如何从Firebase Storage获取URL downloadURL [重复]

问题描述 投票:-3回答:1
我有相同的问题,但是我想知道如何迅速解决它?How to get URL from Firebase Storage getDownloadURL

而且,Firebase how to get Image Url from firebase storage?

所以我的问题是否可以通过使用Firebase存储参考获取下载URL?我想通过提供来自存储的图像引用来获取图像下载URL。

提前感谢

swift firebase firebase-storage
1个回答
0
投票
Storage Download Files Docs

// 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!) } }

© www.soinside.com 2019 - 2024. All rights reserved.