Laravel Image upload returns 413 (file too large)
Hi, I have endpoint in my laravel app that uploads images but it returns with the status code of 413. I found some solutions like modifying the
client_max_body_size
and put it on https://github.com/railwayapp/nixpacks/blob/main/src/providers/php/nginx.template.conf, now my problem is I also have to modify the php.ini and put this values in there
post_max_size = 50M upload_max_filesize = 50MIs there a way to do this in railway? Project ID: d6f6b5f2-d28d-482c-a2c6-d488df252fff
5 Replies
Project ID:
d6f6b5f2-d28d-482c-a2c6-d488df252fff
Solution
try adding these two files to your project
It works now. Thanks :salute:
awsome!
New reply sent from Help Station thread:
Facing same issue any solution?You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Here are those two files saved in a Gist - https://gist.githubusercontent.com/brody192/fcc1136b61c3de20609fa91ee384d47c/raw/ce378646c63ef5027a0290ba1418b9b2590b825b/nginx.template.conf https://gist.githubusercontent.com/brody192/ed12b50fd39e373a28d75f25b100a87d/raw/902c24eaf3cc60bdffd48189f0e2314c6ea3cd73/nixpacks.toml Simply add them to your project.You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
I tried using this, but my build is failing.You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Please open a new thread and attach your build logs to the first comment - https://bookmarklets.up.railway.app/log-downloader/You're seeing this because this thread has been automatically linked to the Help Station thread.