title: How to send send json and multipart file in postman both having @RequestPart annotation in controller
body: <p>I have developed a code which takes input Json and Multipart file as input. But, when I am trying to call this API in postman, I am getting error as:</p>
  
  <blockquote>
    <p>Required request part 'input' is not present"</p>
  </blockquote>
  
  <p>Here is my controller:</p>
  
  <pre><code>@RequestMapping(value={"/saveThumbnail"}, method={RequestMethod.POST},  
              consumes={"multipart/form-data"}, headers={"Accept=application/json"}) 
      public ImageConversionOutput convertImageIntoThumbnail(@RequestPart ImageConversionInput input, @RequestPart(value = "file") MultipartFile file)
      {
          ImageConversionService service = new ImageConversionService();
          System.out.println(input);
          ImageConversionOutput  output = null;
          try {
               output = service.convertImageToThumbnail(input, file, imageRepository);
              }
          catch(Exception e)
          {
              e.printStackTrace();
          }
          return output;
  
      }
  </code></pre>
  
  <p>My postman Request is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/sEior.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sEior.png" alt="Request Headers"></a></p>
  
  <p><a href="https://i.stack.imgur.com/PSidT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PSidT.png" alt="Request parameters "></a></p>
  
  <p>I am getting below error:</p>
  
  <p><a href="https://i.stack.imgur.com/Jnzwp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jnzwp.png" alt="enter image description here"></a></p>