【发布时间】:2018-09-19 05:52:56
【问题描述】:
我们正在为 Outlook 开发 Office 插件,我们需要打开一条新消息,其中包含我们从我们自己的 rest-interface 获取的 Json 格式的预定义数据,如下所示:
{
"attachmentNo": "1",
"Content-Type": "application/pdf;",
"name": "CPV - Lohnbeilage Planwahl_2018_Lohnbeilage_D.PDF",
"Content-Transfer-Encoding": "base64",
"Content-Disposition": "attachment;",
"filename": "CPV - Lohnbeilage Planwahl_2018_Lohnbeilage_D.PDF",
"content": "JVBERi0xLjUNCiW1tbW1DQoxID....",
"fileType": "pdf",
"fileSize":"15MB"
}
要为 displayNewMessageForm 方法提供附件,我需要以下格式:
{
type: 'file',
name: "CPV - Lohnbeilage Planwahl_2018_Lohnbeilage_D.PDF",
url: ???,
isInline: false
}
有没有可能使用像这样的 data-url 之类的东西:
'data:application/octet-stream;charset=utf-8;base64,JVBERi0xLjUNCiW1tbW1DQoxID....'
作为 url 还是有其他技巧可以设法将未保存的附件添加到新邮件中?
【问题讨论】:
标签: outlook-addin office-js outlook-restapi