草庐IT

downloadURLWithCompletion

全部标签

ios - Firebase downloadURLWithCompletion 错误

我正在尝试从我的Firebase存储中下载视频。我这样做的方法是使用.downloadURLWithCompletion函数。每当函数执行时,我都会收到此错误ErrorDomain=FIRStorageErrorDomainCode=-13010"Objectvideos/video1.m4vdoesnotexist."UserInfo={object=videos/video1.m4v,bucket=**********.appspot.com,ResponseBody={"error":{"code":404,"message":"NotFound"}},data=,NSLocal

ios - Firebase 存储警告 : downloadURL( )' is deprecated: Use ` StorageReference. downloadURLWithCompletion()

我刚刚将我的项目更新到最新版本的FirebaseStorage,现在我收到一条警告:downloadURL()已弃用:使用StorageReference.downloadURLWithCompletion()获取当前下载URL。我查看了Firebase图片上传文档,但它仍然引用了现在已弃用的downloadURL()。在下面的代码中,我将图像的下载URL作为字符串获取。代码有效,但现在要更新,因为downloadURL()已贬值uploadProfilePicTask.observe(.success){snapshotinguardletprofilePicStringURL=sn

swift - Firebase 存储 downloadURL( )' is deprecated: Use ` StorageReference.downloadURLWithCompletion()

通常我会使用url将图像更新到firebase存储:Storage.storage().reference().child("profile_images").child(fileName).putData(uploadData,metadata:nil){[weakself](metadata,err)inguardletstrongSelf=selfelse{return}ifleterr=err{print(err)}guardletprofileImageUrl=metadata?.downloadURL()?.absoluteStringelse{return}Profile