title: iOs Multiples Files upload with AFNetworking
body: <p>I'm using AFnetworking for my iPhone project, i'm a beginner in Objective C.</p>
  
  <p>I know how to upload multiples files using blocks, as describes here :
  <a href="https://stackoverflow.com/questions/9559075/how-do-you-upload-multiple-files-with-afnetworking">How do you upload multiple files with AFNetworking</a></p>
  
  <p>So into the block, we can add as many formData elements as we want.</p>
  
  <p>But in my case, i do not know how many pictures i will have, since the user is free to select many. The picture's data is store into an array.</p>
  
  <p>So i tried something like that into the block, but only the last element is uploaded :</p>
  
  <pre><code>for(NSDictionary *dict in imagesInfo) {
  
        UIImage *theFile = [dict objectForKey:UIImagePickerControllerOriginalImage];
        NSData *imageData = UIImageJPEGRepresentation(theFile, 0.5);
       [formData appendPartWithFileData:imageData name:@"name" fileName:@"name.jpg" mimeType:@"image/jpeg"];
  
  }
  </code></pre>
  
  <p>Anyway, i was able to get it working by launching another request when the first one has finished. 
  But i guess there is a best way to get it working ?</p>
  
  <p>Tanks a lot, </p>
  
  <p>Rodolphe</p>