I want to stop user to upload of a file which is greater than 8mb (without uploading the whole file and then denying it). I put checks at browser and server levels but server level checks deny the upload after the image is uploaded. I want to stop the upload as soon as 8 mb is uploaded. Any ideas to implement it ?
I tried upload_max_filesize
php.ini variable but it shows after the uploading completes.