How to get MIME type of uploaded file in Jersey
I have a standard upload endpoint in Jersey: @POST @Secure @Consumes("multipart/form-data") public Response upload( @Context final HttpHeaders hh, @FormDataParam("fileaaa") final FormDataContentDisposition disposition, @FormDataParam("fileaaa") final InputStream input, How can I get the MIME type of the uploaded file? If I do disposition.getType this gets me the MIME type of the form; in this case form-data . I know the information is there somewhere; the HTTP message should be something like: -----------------------------7d01ecf406a6 Content-Disposition: form-data; name="input_text" mytext --