나는 메시지를 게시 할 수 있어요하지만 첨부 파일 또는 pending_attachment 중 하나를 추가 할 때, 내가 말하는 오류가 발생합니다 :불평 API를 통해 파일을 업로드
형식 오류 : '스텝 업'구현하지 않는 개체에서 호출 HTMLInputElement 인터페이스.
function post() {
yam.getLoginStatus(function(response) {
if (response.authResponse) {
yam.request(
{ url: "https://api.yammer.com/api/v1/messages.json" //note: the endpoint is api.yammer...
, method: "POST"
, data: {
"body" : document.getElementById("post_body").value,
"group_id" : document.getElementById("group_id").value
,"attachment1" : document.getElementById("attachment")
}
, success: function (msg) {
alert("Post was Successful!: " + msg.messages[0].id); //id of new message
}
, error: function (msg) { alert("Post was Unsuccessful..." + msg); }
}
);
} else {
yam.login(function (response) {
//nothing
});
}
});
}