I am having a problem with loading a PHP file. I am trying to submit a form using AJAX. This ajax request contains text variables and files. When I try to send only one file, everything will be fine, but if I send several files. I get a 413 Request Entity Too Large message . I am using Apache. Here is my code
var data = new FormData();
data.append( 'name','my upload file');
var img1 = $('#src1').find('img').attr('src');
var img2 = $('#src2').find('img').attr('src');
var img3 = $('#src3').find('img').attr('src');
var img4 = $('#src4').find('img').attr('src');
if(img1 != undefined)
{
data.append( 'image1', img1);
}
else
{
data.append( 'image1', "");
}
if(img2 != undefined)
{
data.append( 'image2', img2);
}
else
{
data.append( 'image2', "");
}
if(img3 != undefined)
{
data.append( 'image3', img3);
}
else
{
data.append( 'image3', "");
}
if(img4 != undefined)
{
data.append( 'image4', img4);
}
else
{
data.append( 'image4', "");
}
$.ajax({
type: "POST",
url: "server.php",
data: data,
cache: false,
processData: false,
contentType: false,
success: function(result){
console.log(1);
}
});
All my downloaded files are less than 700 KB, I also checked the PHP setup with ini_get_all (), and I found that post_max_size is 48 MB, upload_max_filesize is 32 MB. I don’t understand what is the cause of this problem.
, , ( 10 ), , 400 . .