so i'm doing this project i got in React - and i need to upload a picture (and send it to the Database - express) im using file Reader and sending base64 string to the server ( i have npm that converts it to photo) it works perfect but i do have 1 problem, it only lets me upload small pictures / low quality images , and if the picture is too big , i get this error -
Failed to load resource: the server responded with a status of 413 (Payload Too Large)
what can i do to fix it and let it send bigger pictures?
my code in React -
async fileLoader(ev){
if(ev.target.files[0]){
var reader = new FileReader();
var files = ev.target.files;
let res = await reader.readAsDataURL(files[0]);
debugger;
var newFileName = files[0].name
setTimeout(()=>{
this.setState({fileData:reader.result , fileName:newFileName})
}, 30)
}
}