title: Spring boot Multipart file upload as part of json body
body: <p>I'd like to know if it's possible to have a post endpoint that can accept a json payload that contains a multipartfile as well as other data. e.g. my body object would look like:</p>
  
  <pre><code>public class Bio {
      private Long id;
      private String firstName;
      private MultipartFile imageFile;
  }
  </code></pre>
  
  <p>A separate but related question is that in the springboot doc example for uploading a file, <a href="https://spring.io/guides/gs/uploading-files/">https://spring.io/guides/gs/uploading-files/</a>, the file is part of the request path rather than the payload. This seems strange to me so is there a way to have the file bind to the request body?</p>