Something I observed with camel-servlet on Camel Quarkus. Undertow provides the Servlet support and the way that it's implementation of multipart attachment parsing works, assumes that the request body has not been read yet. Otherwise it will not attempt to process attachments.
In DefaultHttpBinding.readyBody. The body is read first:
And then attachments processed at the end:
I tested moving attachment processing to the beginning and it made my test case work successfully.
Not sure if that change could potentially screw things up non-undertow servlet containers?
This same issue is probably present on Spring Boot with Undertow. I've not checked.