Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

undeportedmexican's avatar

Proper way to fix Large Post Size Exception

Hello all ...

I know the root cause behind this issue is that I'm trying to post a file larger than what's configured in my server.

My head automatically jumps to modify the php.ini file, however, something tells me this is not the right approach to fix this issue.

Is this the only way? Should I be doing something different on the client-side before sending the file?

I'm using Vue/Intertia on the client side if that's relevant.

Thanks!

0 likes
3 replies
jlrdw's avatar
jlrdw
Best Answer
Level 75

Lookup how to chunk a large file.

Snapey's avatar

if you use a client-side uploader like filepond or dropzone then you can set a limit on the client end.

Otherwise the server has no way of knowing how much data is coming, it tries to read the file and at some point hits the limit and rejects the connection.

undeportedmexican's avatar

Thank you both ... looks like there's not a straight forward solution here.

I was hoping there could be something out of the box from the browser / ajax request or something, but now that I read about it, I understand why that's not the case.

I was trying to upload the file alongside some information (I'm uploading a video, alongside with description, title, section and that kind of stuff), but I realize now I have to handle the upload and the record creation in database separately.

Thanks!!

Please or to participate in this conversation.