title: How to upload file with Spring 5 webClient
body: <p>I try to upload files with webClient Spring5 (multipart/form-data), but I got 400 Badrequest there is my code (when i try with restTemplate all work fine), don't understand why not work with webclient, any help is precious, thanks in advance...</p>
  <pre><code>MultipartBodyBuilder builder = new MultipartBodyBuilder();
  
  builder.part(&quot;subject&quot;, parametres.getSubject());
  
  builder.part(&quot;lifetime&quot;, parametres.getLifeTime());
  
  builder.part(&quot;comment&quot;, parametres.getComment());
  
  builder.part(&quot;encrypted&quot;, parametres.getEncrypted());
  
  builder.part(&quot;file&quot;, new FileSystemResource(file)).filename(file.getName()) //file is a java.io.File`
  ClientResponse response = getClient().post()
       .uri(&quot;/messages&quot;)
       .body(BodyInserters.fromMultipartData(builder.build()))
       .header(PlinePlexHeaderEnum.HTTP_HEADER_PROCURATION_USER_ID.value(), idUser))
       .header(HttpHeaders.CONTENT_TYPE, MediaType.MULTIPART_FORM_DATA_VALUE)
       .exchange().block();
  </code></pre>