title: Getting 400 BAD REQUEST when uploading a blob to JAVA server Jersey API
body: <p>I'm trying to upload a cropped image sending it as a blob and getting an 400 http error.
  When checking it carefully, I've noticed the following exception:</p>
  
  <p><em>java.lang.IllegalStateException: Entity input stream has already been closed.</em></p>
  
  <p>The JavaScript code:</p>
  
  <pre><code>var fd = new FormData();
  fd.append("pic", cblob); //append the blob
  $.ajax("/wsbasestructure/ws/users/test", {
    data: fd,
    type: "PUT",
    processData: false,
    contentType: false,
    success: function (data) {
    }
  });
  </code></pre>
  
  <p>The Java code:</p>
  
  <pre><code>@PUT
  @Path("/test")
  public String updatePic(@FormDataParam("pic") InputStream file){
      System.out.println(file);
      return null;
  }
  </code></pre>
  
  <p>What am I missing here?
  Thank you for your time.</p>