크로스 도메인 이슈로 ajax이 먹히지 않아,
javacript SDK 를 아래와 같이 사용했으나,
에러메시지가 나타납니다.
URL을 https://kapi.kakao.com/v1/vision/thumbnail/crop 로 바꾸어도 안되는데
알려주시면 정말 감사드리겠습니다.
Uncaught l {name: “KakaoError”, message: “Missing required keys: image_url at API.request - /v1/vision/thumbnail/crop”}name: "KakaoError"message: "Missing required keys: image_url at API.request - /v1/vision/thumbnail/crop"proto: Error
at https://developers.kakao.com/sdk/js/kakao.min.js:87:29929
at Object.10…/browserProxy.js (https://developers.kakao.com/sdk/js/kakao.min.js:87:32078)
at c (https://developers.kakao.com/sdk/js/kakao.min.js:87:799)
at https://developers.kakao.com/sdk/js/kakao.min.js:87:833
at https://developers.kakao.com/sdk/js/kakao.min.js:87:52378
at Object.19…/api.js (https://developers.kakao.com/sdk/js/kakao.min.js:87:53186)
at c (https://developers.kakao.com/sdk/js/kakao.min.js:87:799)
at p (https://developers.kakao.com/sdk/js/kakao.min.js:87:957)
at https://developers.kakao.com/sdk/js/kakao.min.js:87:974
at https://developers.kakao.com/sdk/js/kakao.min.js:87:523
c.processRules @ VM3237 kakao.min.js:87
n.request @ VM3237 kakao.min.js:87
insertThumbnail @ VM3265:169
(anonymous) @ VM3265:146
dispatch @ VM3249:3
q.handle @ VM3249:3
==================== 아 래 ====================
Kakao.init('****************************');
function insertThumbnail(){
var imgUpload = $("#mf").val();
console.log("전송 이미지 : +"+imgUpload);
Kakao.API.request({
url : "/v1/vision/thumbnail/crop",
data:{
file: imgUpload,
width: 200,
height: 200
},
success : function(data){
console.log("result : "+data);
$('#thumbnail_crop_preview_image').attr("src", result.thumbnail_image_url);
},
fail : function(){
alert("이미지 파일을 확인하세요");
}
})
}