swiftuploadawss3transfermanager

Is there a difference between uploading from file vs an in memory UIImage?


I'm trying to upload a file from UIImagePickerController. Is it better to upload an image from memory or save it to disk then upload to S3

Which takes less resources? Currently weaker devices like an iPhone 5 struggles to upload the file.


Solution

  • Your problem is that older devices have lower cellular speeds. There should not be any significant difference in WiFi speeds between iPhone 5 and newer models.

    Since it is the uplink speed that is the problem, it makes no difference whether you are sourcing your image from memory or disk. Moving an image from memory to disk and then back to memory before uploading has no advantages except for the fact that only parts of the image maybe kept in memory waiting for upload.