msal.jsを利用してjavascriptのクライアントからWord、PowerPoint、Excelファイルを新規作成(POST)してみたのですが、
作成したファイルをTeamsのWebクライアントで表示したところ「このファイルには、表示できるプレビューがありません。」と表示されます。
デスクトップのOfficeクライアントでファイルを新規作成するのと同様のプロセスをGraphAPIで適切に行う方法はありますでしょうか。
■詳細
・エンドポイント:https://graph.microsoft.com/v1.0/groups/${groupId}/drive/items/${parentItemId}/children
・POSTのリクエストBody:
const json =
{
"name": "test.docx",
"file": {
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
},
"@microsoft.graph.conflictBehavior": "rename"
};
※PowerPointの場合はname="test.pptx"、mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"
作成したファイルをTeamsのWebクライアントで表示したところ「このファイルには、表示できるプレビューがありません。」と表示されます。
デスクトップのOfficeクライアントでファイルを新規作成するのと同様のプロセスをGraphAPIで適切に行う方法はありますでしょうか。
■詳細
・エンドポイント:https://graph.microsoft.com/v1.0/groups/${groupId}/drive/items/${parentItemId}/children
・POSTのリクエストBody:
const json =
{
"name": "test.docx",
"file": {
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
},
"@microsoft.graph.conflictBehavior": "rename"
};
※PowerPointの場合はname="test.pptx"、mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"