title: AngularJS + Spring: 415 unsupported media type
body: <p>http post is getting error while uploading multipart data</p>
  
  <pre><code>var formData = new FormData();
  
  formData.append("startDate",$("#startDate").val());
  formData.append("File1",$("input[name='file']")[0].files[0]);
  formData.append("File2",$("input[name='file2']")[0].files[0]);
  
  $http.post("sampleurl",formData,
  { headers : 'Content-Type' : undefined},
  transformRequest : angular.identity
  }).then(function(data){
    alert(data);
      });
  }
  </code></pre>
  
  <p>my server side code is </p>
  
  <pre><code>@RequestMapping(value = "sampleurl", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON)
      public @ResponseBody
      Response createSomething(
              @RequestBody Request request,
              HttpServletRequest httpServletRequest,
              HttpServletResponse httpServletResponse) {
              // code here
      }
  </code></pre>
  
  <p>what went wrong here, i am stucked to find the solution, please help me to find the solution</p>