javaquarkusresteasymultiparthttp-status-code-413

Quarkus - 413 Request Entity Too Large


I am developing a Quarkus application and using RESTEasy Reactive. One of the endpoints receives a multipart/form-data mime type object but when I try to use it sometimes the "413 - Request Entity too Large" error occurs.


Solution

  • After digging the Quarkus documentation, the property you really need to configure is this:

    quarkus.http.limits.max-form-attribute-size
    

    I have set this to 4M (4 megabytes), like this, on my application.yaml file, but of course you can configure it for any value you may want:

    quarkus:
        http:
            limits:
                max-form-attribute-size: 4M
    

    Keep in mind that if you are using an application.properties file instead, you should do it like this:

    quarkus.http.limits.max-form-attribute-size=4M