title: SPRING REST: The request was rejected because no multipart boundary was found
body: <p>I did a POC for spring 3 rest multipart file upload. Its working fine. But when i tried integrating with my application i am facing issues. </p>
  
  <p>It throws following exception:</p>
  
  <pre><code>org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request;
  nested exception is org.apache.commons.fileupload.FileUploadException:
  the request was rejected because no multipart boundary was found**"
  </code></pre>
  
  <p>Please let me know if I am wrong in any part of my code.</p>
  
  <p>Beans:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"&gt;
   &lt;property name="order" value="1" /&gt;
   &lt;property name="mediaTypes"&gt;
   &lt;map&gt;
     &lt;entry key="json" value="application/json" /&gt;
     &lt;entry key="xml" value="application/xml" /&gt;
     &lt;entry key="file" value="multipart/mixed" /&gt;
   &lt;/map&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  &lt;!-- multipart resolver --&gt;
   &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
    &lt;!-- one of the properties available; the maximum file size in bytes --&gt;
    &lt;property name="maxUploadSize" value="50000000" /&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>@Controller
  public class MultipleFilesRecieve {
      @RequestMapping ( value = "/saveMultiple", method = RequestMethod.POST )
          public String save( FileUploadForm uploadForm ) {
          List&lt;MultipartFile&gt; files = uploadForm.getFiles( );
          List&lt;String&gt; fileNames = new ArrayList&lt;String&gt;( );
          if ( null != files &amp;&amp; files.size( ) &gt; 0 ) {
              for ( MultipartFile multipartFile : files ) {
                  String fileName = multipartFile.getOriginalFilename( );
                  fileNames.add( fileName );
              }
          }
          return "multifileSuccess";
      }
  }
  </code></pre>