title: Howto upload multiple files with Spring Boot and test it with cURL
body: <p>I have implemented a Controller to upload multiple files:</p>
  
  <pre><code>public class Image implements Serializable {
      private MultipartFile file;
      private Ingeger imageNumber;
      ...
  }
  
  @RequestMapping(value = "/upload", method = RequestMethod.POST)
  public void handleFileUpload(@RequestBody Set&lt;Image&gt; images) {
     ...
  }
  </code></pre>
  
  <p>I correctly checked the code using only <em>one</em> MultipartFile directly in the upload method using this command:</p>
  
  <pre><code>curl http://localhost:8080/upload -X POST -F 'file=@1.jpg;type=image/jpg' -H "Content-Type: multipart/form-data"
  </code></pre>
  
  <p>I need to extend it in three ways but don't know the correct syntax:</p>
  
  <ol>
  <li>POST a collection of JSON items</li>
  <li>Add the field "imageNumber" for each item</li>
  <li>Most tricky part: add a file nested to each item</li>
  </ol>