1

I am getting 413 (Payload Too Large) when I try to upload a video with size 10MB. How can I change the app service upload size.

Server:Azure App service (Linux Nginx) API: PHP 8

I tried adding client_max_body_size 100M;didn't work

enter image description here

Seminda
  • 1,745
  • 12
  • 15
  • This question does not seem to be about programming or software development and therefore is not a good fit for SO... Please refer to [ask]. On-topic: [Search is your friend](https://www.google.com/search?q=nginx+413) – rickvdbosch Jan 24 '23 at 14:45
  • Also: does this answer your question? [Azure App Service Returning 413 Payload Too Large on Long POST Request](https://stackoverflow.com/questions/70071422/azure-app-service-returning-413-payload-too-large-on-long-post-request) – rickvdbosch Jan 24 '23 at 14:47

1 Answers1

0

you will need to modify the client_max_body_size directive in the nginx configuration file. The location of the configuration file is:

/etc/nginx/nginx.conf

add or edit the following setting:

client_max_body_size 100M;

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • I tried that, and it didn't work for me. I updated my question with what I did – Seminda Jan 24 '23 at 15:04
  • I am struggling with this same issue. Where do you put the "client_max_body_size 100M;" line? there is no http block in the nginx.conf file for the Azure web app. There is only a server block. I've tried putting that line in various places to no effect. – AQuirky Aug 30 '23 at 23:26
  • https://stackoverflow.com/a/66777762/1384539 – Thiago Custodio Aug 31 '23 at 13:00