编码新手,会在jpegData行上不断出现此错误,并且不知道为什么会出错。谢谢
if let imgData = UIImage.jpegData(compressionQuality:0.2) {
let imgUid = NSUUID().uuidString
let metadata = StorageMetadata()
metadata.contentType = "image/jpeg"
Storage.storage().reference().child(imgUid).put(imgData, metadata: metadata) { (metadata, Error) in
if error != nil {
print("Did not upload image")