Uploading Big Files with Micronaut and Elastic Beanstalk
by Sergio Del Amo CaballeroIf you want to upload files with Micronaut, you may need to configure maximum request size and the max file size properties. Here's how to do that.
If you want to upload files with Micronaut, you may need to configure maximum request size and the max file size properties:
Here’s how to do that.
micronaut:
server:
max-request-size: '100MB'
multipart:
max-file-size: '100MB'
If you wish to to deploy AWS Elastic Beanstalk, an easy-to-use service for deploying and scaling web applications, you may get “413 Request Entity Too Large” errors when posting files larger than 10MB.
You can allow bigger file uploads by creating a file named src/main/resources/.ebextensions/nginx/conf.d/proxy.conf
with content:
client_max_body_size 100M;
To learn more, read Configuring the Reverse Proxy section in the Elastic Beanstalk documentation.