Pring
Pring copied to clipboard
File saving failed using batch
[REQUIRED] Step 1: Describe your environment
- Xcode version: 9.2
- Pring version: 0.7.8
[REQUIRED] Step 3: Describe the problem
I tried to save Images using WriteBatch class. Saving to Firestore is succeeded, but File is not saved in storage.
Relevant Code:
class Image: Object {
dynamic var file: File?
}
let imageModel = Firebase.Image()
imageModel.file = File(data: UIImageJPEGRepresentation(image, 1.0)!)
let batch = Firestore.firestore().batch()
batch.add(.save, object: imageModel)
batch.commit { error in
print(error) // printed nil, but file is not exist in storage
}
I have also encountered the same problem. ・Xcode version: 10.0 ・Swift version: 4.2 ・Pring version: 0.13.6
Has same issue