title: File Upload in static/css/question_image folder
body: <p>I want to upload a file in static/css/question_image which is a directory in my Spring Boot project. </p>
  
  <p>By using below code i am able to upload the image but it is getting stored in my local system some directory and it doesn't appear in project folder structure.</p>
  
  <pre><code>            Iterator&lt;String&gt; itr =multipartHttpServletRequest.getFileNames();
  
                   while(itr.hasNext()){
                       fileName = itr.next();
                       MultipartFile file =multipartHttpServletRequest.getFile(fileName);
                       System.out.println("File name is "+file.getOriginalFilename());
                       byte[] byteArr = file.getBytes();
                       File convFile = new File("static/"+file.getOriginalFilename());
                       convFile.createNewFile();   
                       BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(convFile);
  
                       stream.write(byteArr);
                       stream.close();
  </code></pre>