Laravel Image upload returns 413 (file too large)
dipluxsolutions
HOBBYOP

2 years ago

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

postmaxsize = 50M
uploadmaxfilesize = 50M
Is there a way to do this in railway?

Project ID: d6f6b5f2-d28d-482c-a2c6-d488df252fff

Solved

7 Replies

brody
EMPLOYEE

2 years ago

try adding these two files to your project

1233829020223672422
1233829020555284510


dipluxsolutions
HOBBYOP

2 years ago

It works now. Thanks <:salute:1137099685417451530>


brody
EMPLOYEE

2 years ago

awsome!


saptarshidy
HOBBY

2 years ago

Facing same issue any solution?



Status changed to Solved Railway over 1 year ago


lightshire
PRO

2 years ago

I tried using this, but my build is failing.


brody
EMPLOYEE

2 years ago

Please open a new thread and attach your build logs to the first comment -

https://bookmarklets.up.railway.app/log-downloader/


Loading...