title: spring boot upload file allow only images
body: <pre><code>@Controller
  public class UploadController {
  
      @PostMapping("/upload") 
      public String upload(@RequestParam("file") MultipartFile file) {
          // save
      }
  }
  </code></pre>
  
  <p>How to specify/config that only images(jpeg, png) are allowed to be uploaded?</p>