gpt4 book ai didi

swift - StorageMetadata' 没有成员 'downloadURL'

转载 作者:搜寻专家 更新时间:2023-10-31 22:01:14 32 4
gpt4 key购买 nike

<分区>

我使用下面的代码,但是当我更新代码并且 pod 出现以下错误时:

StorageMetadata' has no member 'downloadURL'

 static func uploadVideoToFirebaseStorage(videoUrl: URL, onSuccess: @escaping (_ videoUrl: String) -> Void) {
let videoIdString = NSUUID().uuidString
let storageRef = Storage.storage().reference(forURL: Config.STORAGE_ROOF_REF).child("posts").child(videoIdString)
storageRef.putFile(from: videoUrl, metadata: nil) { (metadata, error) in
if error != nil {
ProgressHUD.showError(error!.localizedDescription)
return
}
if let videoUrl = metadata?.downloadURL()?.absoluteString {
onSuccess(videoUrl)
}
}
}

我该如何解决这个问题?

更新:

new errors

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com