I am implementing a photo uploader in Swift.
After getting a UIImage from a UIImagePickerController, I will resize the image, perhaps to be less than 100 KB.
Then, I will convert the UIImage to data using UIImageJPEGRepresentation().
Should I then directly upload the resulting NSData in-memory?
Or, for memory purposes, should I first store the NSData to a file and then upload the file? Would doing that save memory?