fileAttachment 资源类型

命名空间:microsoft.graph

用户事件邮件帖子中附加的文件(例如文本文件或 Word 文档)。

创建文件附件时,在请求正文中包括以下内容:

  • "@odata.type": "#microsoft.graph.fileAttachment"
  • 必要属性 名称contentBytes

派生自 附件

备注

确保先使用 base64 为文件内容编码,然后再将其分配到 contentBytes

方法

方法 返回类型 说明
Get fileAttachment 读取 fileAttachment 对象的属性、关系或原始内容。
删除 删除 fileAttachment 对象。

属性

属性 类型 说明
contentBytes Edm.Binary 文件的 Base64 编码内容。
contentId String 获取 Exchange 存储中的附件 ID。
contentLocation String 请勿使用此属性,因为它不受支持。
contentType String 附件的内容类型。
id String 附件 ID。
isInline Boolean 如果是内嵌附件则设置为 true
lastModifiedDateTime DateTimeOffset 上次修改附件的日期和时间。
name String 表示显示在表示嵌入的附件的图标下方的文本的名称。该名称不必是实际的文件名。
size Int32 附件大小,以字节为单位。

关系

无。

JSON 表示形式

下面是资源的 JSON 表示形式

{
  "contentBytes": "string (binary)",
  "contentId": "string",
  "contentLocation": "string",
  "contentType": "string",
  "id": "string (identifier)",
  "isInline": true,
  "lastModifiedDateTime": "String (timestamp)",
  "name": "string",
  "size": "Int32"
}