Open MorganJH-Kim opened 3 years ago
ajax 사용에서 많은 에러와 직면했으나 해결하여 글쓰기 기능을 완성 할 수 있었음.
$.ajax({
enctype: 'multipart/form-data',
type:"post",
url:"/post/create",
processData: false,
contentType: false,
data:formData,
success:function(data) {
if(data.result == "success") {
location.href = "/post/main";
} else {
alert("레시피 등록에 실패했습니다.");
}
}, error:function(e) {
alert("ajax error");
}
});