IS it any way to validate on file size in php before upload. I have added java-script validation but user disabled client side validation and upload files in GB's so browser of user wait more then 30 minutes to upload then at the time of move file in php i display message file size is greater. User irritates. Please let me know any way to validate file size at the time of file upload
Asked
Active
Viewed 234 times
1
-
1It's not possible, because client upload something on server and then is call php to process it, so you can do this only with server settings – Unlink Oct 09 '14 at 08:03
1 Answers
1
It's not possible do this in php, because when you upload data, webserver handle request and then execute php script, so, user must upload his request first.
If user has disabled javascript you can limit max request body, so webserver cannot accpet bigger requests
For apache webserver you can set limitrequestbody

Unlink
- 973
- 1
- 7
- 14