title: Springboot Required request part 'file' is not present
body: <p>I am working on a file upload controller and I am currently getting the following error when testing in Postman. </p>
  
  <pre><code>{
      "timestamp": "2019-04-18T14:53:07.988+0000",
      "status": 400,
      "error": "Bad Request",
      "message": "Required request part 'file' is not present",
      "path": "/upload"
  }
  </code></pre>
  
  <p>At the moment my controller is very simple but first I need to overcome this problem.</p>
  
  <p>I have looked at the answers given 
  [here](<a href="https://stackoverflow.com/questions/43936372/upload-file-springboot-required-request-part-file-is-not-present">upload file springboot Required request part &#39;file&#39; is not present</a>"upload file springboot Required request part file is not present")!</p>
  
  <p>But unfortunately, anything suggested here did not resolve my problem</p>
  
  <p>Any help with this error would be appreciated</p>
  
  <p>This is my controller:</p>
  
  <pre><code>@Controller
  public class UploadController {
  
  @ResponseBody
  @RequestMapping(value = "/upload", method = RequestMethod.POST)
  public boolean upload(@RequestParam("file") MultipartFile file) throws IOException {
  
          try {
              if (!file.isEmpty()) {
                  return true;
              } else {
                  return false;
              }
          }
          catch(Exception e){
              e.printStackTrace();
              return false;
          }
  
      }
  }
  </code></pre>