On Message Compose,I got the email body,The text contains some image information。How to use img's src attribute let me get real image path?
Office.context.mailbox.item.saveAsync(function (result) {
const itemId = result.value;
Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, (result) => {
const token = result.value;
const apiUrl = Office.context.mailbox.restUrl + "/v2.0/me/messages/" + itemId;
axios
.get(apiUrl, {
headers: {
Authorization: "Bearer " + token,
},
})
.then((response) => {
var draftData = response.data.Body.Content;
console.log(draftData);
})
.catch((error) => {
console.log(error);
});
});
});
I tested calling the above code after adding a few pictures in the message writing scene, and the img of the email body is as follows
<img width="450" height="450" id="图片_x0020_2" src="cid:image002.jpg@01D9B4AD.403AFD90" />
<img width="465" height="467" id="图片_x0020_1" src="cid:image001.png@01D9B4AC.2C972DA0" />
What do I need to do to turn cid... into a real image path?