我想向我的Firebase数据库服务器发送一些数据。当我要发送此数据时,会出现以下错误:
[BoringSSL] nw_protocol_boringssl_get_output_frames(1301)[C1.1:2] [0x102336ab0]获取输出帧失败,状态8196 2019-04-03 12:19:20.137902 + 0200 Fortnite Map [4491:1011523] TIC阅读>状态[1:0x0]:1:57
我以前在其他项目中使用过我的代码,它运行良好且没有错误。我不知道我在做什么错。
我试图用谷歌搜索问题,但似乎找不到答案。
static func uploadDataToServer(data: Data, description: String, map_name: String, island_code: String, youtube_link: String, category: String, onSuccess: @escaping () -> Void) {
uploadImageToFirebaseStorage(data: data, onSuccess: { (thumbnailImageUrl) in
sendDataToDatabase(photoUrl: thumbnailImageUrl, description: description, map_name: map_name, island_code: island_code, youtube_link: youtube_link, category: category, onSuccess: onSuccess)
})
}
static func uploadImageToFirebaseStorage(data: Data, onSuccess: @escaping (_ imageUrl: String) -> Void) {
let photoIdString = NSUUID().uuidString
let storageRef = Storage.storage().reference(forURL: Config.STORAGE_ROOF_REF).child("posts").child(photoIdString)
storageRef.putData(data, metadata: nil) { (metadata, error) in
if error != nil {
return
}
}
}
我希望将数据发送到Firebase数据库。感谢您的帮助!