I have some HTML content and need to pass it to the back end via FormData.append. When I try to pass it like HTML contents it shows me Internal Server 500 error. When I pass just text then it successfully hit to the backend.
Code
var _description = "<p><b>Test Description</b></p>";
var formData = new FormData();
formData.append("Description", _description)
Then Send it to the backend via AJAX Call,
$.ajax({
url: $("#addNewsDetails").val(),
// cache: false,
type: "POST",
data: formData,
dataType: 'json',
contentType: "application/json; charset=utf-8",
mimeType: 'multipart/form-data',
processData: false,
contentType: false,
success: function (status) {
//Success
}
});