ubay25's avatar
Level 1

Laravel ValidatePostSize - Content Length

I am trying to understand why the $request->server('CONTENT_LENGTH') is showing a mismatch in size when uploading files.

I have a file with 3MB in size, when I upload it and get the value of $request->server('CONTENT_LENGTH'), it's showing as 7MB. So when I add another file with 3MB in size also (making it 6MB for the 2 files), I get an error because the value now becomes 14MB which exceeds the post_max_size = 10M on my php.ini. I get the PostTooLargeException error from the ValidatePostSize.php.

Any ideas?

0 likes
2 replies

Please or to participate in this conversation.