大型(> 4mb)档案附件 [英] Large (> 4mb) File Attachments

查看:58
本文介绍了大型(> 4mb)档案附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Microsoft Graph API,可以按照

Using the Microsoft Graph API, it is possible to add file attachments to messages as described here. However, since REST requests have a total size limit of 4mb this does not allow for very large attachments.

可恢复的上传会话允许较大的上载,而提供下载链接的参考附件可能会引用这些较大的上载.但是,这些链接显然是短暂的,我们希望在某些时候清理文件.

A resumable upload session allows for larger uploads that may be referenced by reference attachments providing a download link. However, these links are obviously short-lived and we would like to clean up the files at some point.

有什么方法可以创建包含大于4mb的持久文件附件的消息?在这里按照DriveItem-> FileAttachment转换的思路进行思考,但找不到关于该主题的任何内容.非常感谢您的帮助!

Is there any way to create a message with persistent file attachments larger than 4mb? Thinking along the lines of a DriveItem->FileAttachment conversion here, but could not find anything on the topic. Help is very much appreciated!

推荐答案

截至 2017年5月,您可以使用

As of May 2017 you can use the referenceAttachment resource type. This allows you to attach a DriveItem from the OneDrive to a message:

POST https://graph.microsoft.com/beta/me/messages/AAMkAGE1M88AADUv0uFAAA=/attachments
Content-type: application/json
Content-length: 319

{ 
    "@odata.type": "#microsoft.graph.referenceAttachment", 
    "name": "Personal pictures", 
    "sourceUrl": "https://contoso.com/personal/mario_contoso_net/Documents/Pics", 
    "providerType": "oneDriveConsumer", 
    "permission": "Edit", 
    "isFolder": "True" 
} 

这篇关于大型(> 4mb)档案附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆