Skip to content

Instantly share code, notes, and snippets.

@ericcgu
Last active August 29, 2015 14:15
Show Gist options
  • Save ericcgu/3f816db1e5b1f977c77f to your computer and use it in GitHub Desktop.
Save ericcgu/3f816db1e5b1f977c77f to your computer and use it in GitHub Desktop.
Parse Image Upload
let pickedImage:UIImage = "SOME IMAGE"
let scaledImage = scaleImageWith(pickedImage)
let imageData = UIImagePNGRepresentation(scaledImage)
let imageFile:PFFile = PFFile(data: imageData)
PFUser.currentUser().setObject(imageFile, forKey: "imageFieldName")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment