我有一个带有附件的活动,大约有50 MB。
以下要求很好:
GET /users/{id}/events/{id}
GET /users/{id}/events/{id}/attachments/{id}?$select=name,size
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('u_id')/events('e_id')/attachments(name,size)",
"value": [
{
"@odata.type": "#microsoft.graph.fileAttachment",
"id": "a_id",
"name": "xxxx",
"size": 51564506
}
]
}
但是当我想获取此附件的内容时:
GET /users/{id}/events/{id}/attachments/{id}
它返回
{
"error": {
"code": "ErrorMessageSizeExceeded",
"message": "The message exceeds the maximum supported size., The message exceeds the maximum supported size.",
"innerError": {
"request-id": "426c3bf3-eda8-40c8-afe6-9b83877a328c",
"date": "2018-10-24T02:31:48"
}
}
}
我该如何处理?
是否可以增加此API的大小限制?
谢谢!
答案 0 :(得分:0)
根据您的描述,我建议您限制附件的大小。
此外,Microsoft Graph当前具有4MB的限制。如果要下载大型附件,则需要编写自定义下载逻辑,该逻辑将连续不断地喜欢该断点,并且该断点不会超过30MB。
P.S。通常,主流邮箱的附件大小在20MB到30MB之间。
参考: