【发布时间】:2016-07-05 10:52:47
【问题描述】:
我正在尝试使用此处记录的暂停、恢复和取消 API 管理来自 Firebase 存储的下载:
https://firebase.google.com/docs/storage/ios/download-files#manage_downloads
我的下载运行良好,但我无法访问这些功能,有人知道如何访问这些功能吗?
var storageRef: FIRStorageReference? = nil
var pathReference: FIRStorageReference? = nil
func downloadImage(imageLocation: String) {
let saveLocation = NSURL(fileURLWithPath: String(HelperFunctions.getDocumentsDirectory()) + "/" + imageLocation)
storageRef = FIRStorage.storage().reference()
pathReference = storageRef!.child(imageLocation)
pathReference!.writeToFile(saveLocation) { (URL, error) -> Void in
}
【问题讨论】:
-
你能为我们粘贴完整的
pathReference初始化吗? -
谢谢,更新问题
标签: swift firebase firebase-storage