I have an application where I want to save a signature with a photo, but in my case I use FIRStorage to store photos. Everything works there, but I want to keep the signature in the photo metadata. Don't ask why, it just makes sense for my project.
let meta = FIRStorageMetadata.init(dictionary: ["customMetadata" :
["caption" : self.textField.text!]])
let imageRef = storageRef.child(iid)
imageRef.put(uploadData, metadata: meta, completion: { (metadata, error) in
if error != nil {
print(error)
return
} else {
print(metadata)
}
})
As you can see, I even set up the metadata constant exactly as Firebase says in its documentation. When I pass meta into metadata in .put, why doesn't it use my own metadata? Thanks for helping the guys
source
share