How To Update Upload Size on Digital Ocean App Platform

Hello, I am using digital ocean app platform and I have an API which uploads large files (can exceed 700 MB), but I have a response with Entity is too large 413 status error. Is it possible to modify this to accept large files?

I am using FastAPI framework and uvicorn as a web server.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @agamaleldin

I believe the same question was asked before in our community. Please check this question and the answer from kamaln7

"PHP applications on App Platform use PHP-FPM in conjunction with Apache (or Nginx if you choose to use it)—the webserver would accept all incoming requests, and forward PHP requests to PHP-FPM which actually executes them. You’ll want to increase the max upload size there. You can do that by adding a .user.ini file at the root of your app’s document root (in the same directory where you would put an .htaccess file. Usually this will be the public directory) with something like this:

post_max_size = 20M
upload_max_filesize = 5M

post_max_size controls the maximum POST requests body size, while upload_max_filesize controls the maximum allowed size of a single file in an upload request.

For more info, you can refer to the Heroku PHP Buildpack documentation. Let me know if that works!"

Regards, Alex