title: Jax RS: multipart/form-data boundary=----WebKitFormBoundary gives 415 unsupported media type
body: <p>I have kendo upload widget send an uploaded file as Post request to the server; where JAX-RS is meant to handle it.</p>
  
  <p>Looking at the network tab of chrome; here's what I see in the request:</p>
  
  <pre><code>Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryARilQnC5oS7lnLVU
  Request Payload
  
  ------WebKitFormBoundaryARilQnC5oS7lnLVU
  Content-Disposition: form-data; name="files"; filename="test_blah.txt"
  Content-Type: text/plain
  
  
  ------WebKitFormBoundaryARilQnC5oS7lnLVU--
  </code></pre>
  
  <p>on the server; here's how I've implemented the Post method</p>
  
  <pre><code>  @POST
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public void uploadFiles(@FormDataParam("files") List&lt;InputStream&gt; files) {
  
      System.out.println("Reached UploadFiles");
  
    }
  </code></pre>
  
  <p>I get an exception stating: <code>Unsupported Media Type (415)</code> on client side </p>
  
  <p>and on server side:</p>
  
  <pre><code>javax.ws.rs.NotSupportedException: Could not find message body reader for type: class org.omg.CORBA.portable.InputStream of content type: multipart/form-data;boundary=----WebKitFormBoundaryARilQnC5oS7lnLVU
  </code></pre>
  
  <p>The kendo call looks like this:</p>
  
  <pre><code>&lt;div class="demo-section k-content" ng-controller="UploadController"&gt;
              &lt;input name="files"
                           id="files"
                           type="file"
                           kendo-upload="uploader"
                           k-select="onSelect"
                           k-async="{ saveUrl: 'http://localhost:8080/path/to/upload', autoUpload: true }"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Can any one give me pointers on </p>
  
  <ol>
  <li>How to accept the multipart/form-data request for this?  </li>
  <li>What's causing the Jax Rs to give this error? Is it the
      <code>WebKitFormBoundary</code> bit? and How can I make the server side code
      deal with this?</li>
  </ol>