How does iOS send maps (about 1,000) to the server in batches?

  ios, question

I want to upload pictures in batches, ranging from several hundred to 1,000. I originally used AFNetwoking method, but there is a disadvantage. I will read all the picture data at one time and then the memory will rub up.

NSOperationQueue *operationQueue = [[NSOperationQueue alloc]init];
 [operationQueue setMaxConcurrentOperationCount:1];
 
 for (NSURL *fileURL in filesToUpload) {
 NSURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST"
 URLString:@"http://example.com/upload" parameters:nil
 constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
 [formData appendPartWithFileURL:fileURL name:@"images[]" error:nil];
 }];
 
 AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
 
 [operationQueue addOperation:operation];
 bracket

Is there any way to implement a queue to read the photo data only when the photo is to be uploaded?

After passing through a successful/failed block, call this method and move the pointer once.
EX:
-(void)fangfa:(int)count{
if (count < 0){
return;
bracket
[class complateblock:{
[self fangfa:count – 1];
},uploadimgArr[count]];
bracket