What is the best way to upload hundreds of photos to a server?

I have an app where the users often times have to take hundreds of photos for insurance purposes.

I am currently storing the photos in the phone file system and then uploading them in batches of 50 photos at a time, which works most of the time.

What gives me problems is when the user switches apps or goes to the lock screen, which then causes all kinds of data transfer problems and errors.

Are there any libraries out there that can gracefully handle photo transfers to a server or is there a better way to do this?