hey guys im running a XML HTTP request and i'm getting the error 413 - ie. image too large. I know its js i'm executing but i think its a php problem so i changed some settings in my php.ini
post_max_size = 10M
upload_max_filesize = 10M
here is the js i'm using
function upload_image(image){
var data = new FormData();
xhr = new XMLHttpRequest();
data.append('image', image);
xhr.open('POST', 'save.php', true);
xhr.upload.onprogress = function(e) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total) * 100;
console.log(percentComplete + '% uploaded');
}
}
xhr.onload = function() {
console.log(this.status);
if (this.status === 200) {
var response = this.response
console.log('Server got:', response);
}
}
xhr.send(data);
}
it works with smaller images but when trying to upload a 4.4 mb image i get the error 413...now i'm a little confused on how i'm getting this error as i've changed my post and upload max sizes
is there something obvious i'm missing here please?
thank you