title: Android okHttp addFormDataPart dynamically for Multiple Image
body: <p>Hello AndroidUploaders,</p>
  
  <p>I had given answer <strong><a href="https://stackoverflow.com/a/34127008/1318946">Uploading a large file in multipart using OkHttp</a></strong> but i am stuck with multiple image uploading.</p>
  
  <p>I want to upload dynamically <strong>1 to 10</strong> image at a time.</p>
  
  <pre><code>RequestBody requestBody = new MultipartBuilder()
                      .type(MultipartBuilder.FORM)
                      .addFormDataPart(KEY_PHOTO_CAPTION, photoCaption)
                      .addFormDataPart(KEY_FILE, "profile.png", RequestBody.create(MEDIA_TYPE_PNG, sourceFile))
                      .build();
  </code></pre>
  
  <p>I have <code>ArrayList</code> of <strong>PhotoCaption</strong> class which has <strong><code>captionPhoto</code></strong> and <strong><code>urlPhoto</code></strong> so how can i <strong>addFormDataPart()</strong></p>
  
  <p>I am thinking to make loop and call this function that many times of <strong>ArrayList</strong> size.</p>
  
  <p>Is there any solution to <strong>addFormDataPart()</strong> use dynamically?</p>