1

I'd like to upload lots of files to server. for instance, the user taken images more than 50 when not reachable on network and hit send button. Then i should upload them when reachable on network. iOS doesn't allows to add session task with large size post request when not reachable on network. so i've tried a chained tasks. but it's takes very long time to wakeup next task.

Kapil dev
  • 223
  • 2
  • 7

1 Answers1

0

There is no limitation for requests in iOS. You can send data with arbitrary length to a server. But, for large data you should avoid loading the complete data into memory. Instead you should setting HTTPBodyStream in NSMutableURLRequest or a file (e.g. uploadTaskWithRequest:fromFile:completionHandler:).

clemens
  • 16,716
  • 11
  • 50
  • 65
  • @Priya https://stackoverflow.com/questions/38349943/background-upload-multiple-images-using-single-nsurlsession-uploadtaskwithreques – Kapil dev May 27 '17 at 13:26