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

demandé il y a 2 ans438 vues
1 réponse
-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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions