简体   繁体   中英

iOS Best Practice for large Upload

I have an application that the user takes a series of pictures, these pictures than need to be uploaded to a server for their online account.

At the moment, I am simply re sizing the images (still about 2mb an image) and uploading them 1 by 1.

The issue arises when the user closes the app mid-upload. Having issues with getting all the images appropriately.

Any elegent solutions? I was thinking of building in an upload manager - keeping track of what's successful and what is not. Restarting uploads next time they open the app. Possibly allowing the Online portion to send a push notification if the user failed to upload a complete set.

Any suggestions, links or guides are greatly appreciated.

write the images to disk using unique names, deleting them from disk upon successful upload. if you need additional context, write that out as well. if you want to notify them, you can do that too.

You may also consider compressing the image and/or zipping them. Still, manageable partitions of the upload is a good idea.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM