HTML Code
<input type="file" id="uploadEditorImage" />
Javascript Code
$("#uploadEditorImage").change(function () {
var data = new FormData();
var files = $("#uploadEditorImage").get(0).files;
if (files.length > 0) {
data.append("HelpSectionImages", files[0]);
}
$.ajax({
url: "~/Admin/HelpSection/AddTextEditorImage/",
type:"POST",
processData: false,
contentType: false,
data: data,
success: function (response) {
//성공시
},
error: function (er) {
alert(er);
}
});
});