Micronaut® Blog

Uploading Big Files with Micronaut and Elastic Beanstalk

By Sergio Del Amo Caballero

February 21, 2019

Tags: #aws #elasticbeanstalk

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.

       max-request-size: '100MB'
           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.