How can I control the max file size and/or the max request size when using resteasy to handle a multipart/form-data request ?
My code looks like this:
@POST
@Path("/somerestresource")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response handleForm(@MultipartForm MyForm form) {
...
}
With a Servlet I can control stuff with the @MultipartConfig
annotation.
So I'm thinking about bypassing resteasy and using @Context
to inject a HttpServletRequest
and having my servlet configured inside the web.xml but I'm unsure of the side effects.