I have been trying to read the Content-Type for an InputStream field belonging to a @MultipartForm parameter. This particular parameter also needs to integrate with Hibernate Validator:
However, any attempt to access the InputPart associated with form parameter "stuff" closes the InputStream. So I suggest updating MultipartFormAnnotationReader so that it supports InputPart as well as InputStream, e.g.
I can then retrieve the InputStream using getBody(InputStream.class, null) and also get the field's associated Content-Type header "for free" .