I have a summernote editor that I am using to upload images/formatted text to the database. Anything that the user puts in my summnernote editor, I am storing its code in my database. I am actually doing it through Jquery/Ajax. However, once the user chooses an image that is greater than 1 MB then my code crashes at the ajax request. I am getting the error 413:request entity too large.
My Jquery Code is like the following:
$('.note-editable').blur(function(){
var code = $('#summernote').summernote('code');
$.post("./update-whats-new", {code: code}).done(function(data) {
});
});
Note that the 'code' variable has my html code from the summernote editor and when my app is trying to proceed to the 'post' part, it crashes.. I am passing the 'code' as a parameter to the post method.. Is there any way to avoid this error without splitting the code into multiple codes and create multiple ajax request. How many bytes can 'code' parameter handle in my ajax post?
Thanks!