I want to upload files directly as an InputStream
body to a JAX-RS POST
request. But the body is limited to 10MB by default, which is too small for some of my files. I found a configuration option MAX_ENTITY_SIZE, but how can I set those in WildFly? I didn't find anything in the jboss-cli.
Asked
Active
Viewed 675 times
2

rü-
- 2,129
- 17
- 37
1 Answers
4
Using the jboss-cli.sh, you would do something like:
/subsystem=undertow/server=default-server/https-listener=https/:write-attribute(name=max-post-size,value=104857600)
(assuming HTTPS) where 104857600 is now 100MB or so.
This modifies the appropriate standalone.xml
to have:
<https-listener name="https" socket-binding="https" max-post-size="104857600" security-realm="ApplicationRealm" enable-http2="true"/>

stdunbar
- 16,263
- 11
- 31
- 53
-
1Works perfectly. I didn't find anything in the docs, because I searched for `MAX_ENTITY_SIZE`... if it applies to all http methods (e.g. also PUT) I think it's not a good idea to name it `max-post-size`. BTW: I had to use the `http` listener (withou `s`), e.g.: `/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-post-size,value=104857600L)` – rü- Sep 08 '20 at 05:20