Spring Boot deployed on Elastic Beanstalk. Need to modify Ngnix to allow large files

1

Hi, I am trying to upload larger files but because of default 1MB limitation, Ngnix is not letting the request go through. I tried adding .platform or .ebextensions with a conf file specifying client_max_body_size 100M but it did not work.

I am using Spring Boot 2.6.4 version and deployed as a Jar file using Java (JDK11) in elastic beanstalk. Can you please help me on what can be done to make sure that Ngnix can allow large files? Very much appreciate your help. Thank you.

With gratitude, Jeelani

feita há 2 anos438 visualizações
1 Resposta
-1

Hi, please go through below steps & see if it helps.

  1. Edit the <<nginx-home>>/nginx.conf file to increase the limit of the files to upload:

http: http { ... client_max_body_size 100M; }

server: server { ... client_max_body_size 100M; }

location: location /uploads { ... client_max_body_size 100M; }

  1. Save the file and restart the NGINX webserver to apply the changes
shethap
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas