Pring icon indicating copy to clipboard operation
Pring copied to clipboard

File saving failed using batch

Open miup opened this issue 6 years ago • 2 comments

[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
}

miup avatar Apr 09 '18 02:04 miup

I have also encountered the same problem. ・Xcode version: 10.0 ・Swift version: 4.2 ・Pring version: 0.13.6

kogetaro avatar Oct 12 '18 05:10 kogetaro

Has same issue

brightsider avatar Nov 27 '18 16:11 brightsider