I'm using apache, PHP.
So, for php, even I set max file size, if someone upload a huge file, it will upload the whole thing to server, and then PHP return error. is that right?
I would like the web server or PHP to stop when the file size or the request size is larger than certain size.
is there a way to do it? I remember something like setting post_max_size or setting something in apache.conf but not sure if it will stop when the file goes over the max limit.
Possible solutions: 1) Configure maximum upload file size and memory limits for your server. 2) Upload large files in chunks. 3) Apply resumable file uploads. Chunking is the most commonly used method to avoid errors and increase speed.
Open the file in any text editor and add the following code. @ini_set( 'upload_max_size' , '20M' ); @ini_set( 'post_max_size', '13M'); @ini_set( 'memory_limit', '15M' ); Save your changes, and it should increase your file upload size.
The maximum file size limit for uploads to Box varies depending on your account type: Free personal: 250 MB. Starter: 2 GB. Business: 5 GB.
Apache's LimitRequestBody, afaik, it just stops the connection when going over....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With