I get similar errors in my error_log in php when users are uploading their files
PHP Warning: POST Content-Length of 11933650 bytes exceeds the limi
I disagree, but this solution to increase the file size in php.ini or .htaccess, will't work if the user send a file larger than allowed in the server application. I suggest validating this on the frontend. Example:
$(document).ready(function() {
$ ('#your_input_file_id').bind('change', function() {
var fileSize = this.files[0].size/1024/1024;
if (fileSize > 2) { // 2M
alert('Your custom message for max file size exceeded');
$('#your_input_file_id').val('');
}
});
});