title: How to get MIME type of uploaded file in Jersey
body: <p>I have a standard upload endpoint in Jersey:</p>
  
  <pre><code>@POST
  @Secure
  @Consumes("multipart/form-data")
  public Response upload( @Context final HttpHeaders hh,
              @FormDataParam("fileaaa") final FormDataContentDisposition disposition,
              @FormDataParam("fileaaa") final InputStream input,
  </code></pre>
  
  <p>How can I get the MIME type of the uploaded file?</p>
  
  <p>If I do <code>disposition.getType</code> this gets me the MIME type of the form; in this case <code>form-data</code>.</p>
  
  <p>I know the information is there somewhere; the HTTP message should be something like:</p>
  
  <pre><code>-----------------------------7d01ecf406a6
  Content-Disposition: form-data; name="input_text"
  
  mytext
  
  -----------------------------7d01ecf406a6
  Content-Disposition: form-data; name="fileaaa";
  filename="C:\Inetpub\wwwroot\Upload\pic.gif"
  Content-Type: image/gif
  
  (binary content)
  -----------------------------7d01ecf406a6--
  </code></pre>