var formData = new FormData(this);
debugger;
$.ajax({
url: formURL,
type: 'POST',
data: formData,
mimeType: "multipart/form-data",
contentType: false,
cache: false,
processData: false,
success: function (data, textStatus, jqXHR) {
debugger;
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
The above code will help you post content plus files in one submit call.
The post method parameter should include HttpPostedFileBase[] file so the list of files will appear in this file parameter