referenceAttachment 资源类型referenceAttachment resource type

重要

Microsoft Graph 中/beta的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

OneDrive for Business 云驱动器上的文件夹或文件 (如文本文件或 Word 文档) 的链接, 以及附加到事件邮件Outlook 任务公告的其他受支持的存储位置。A link to a folder or file (such as a text file or Word document) on a OneDrive for Business cloud drive, or other supported storage locations, attached to an event, message, Outlook task, or post .

派生自 附件Derived from attachment.

方法Methods

方法Method 返回类型Return Type 说明Description
GetGet referenceAttachmentreferenceAttachment 读取 referenceAttachment 对象的属性和关系。Read properties and relationships of referenceAttachment object.
删除Delete None 删除 referenceAttachment 对象。Delete referenceAttachment object.

属性Properties

属性Property 类型Type 说明Description
contentTypecontentType StringString 附件的内容类型。The content type of the attachment. 可选。Optional.
idid StringString 附件 ID。只读。The attachment ID. Read-only.
isFolderisFolder BooleanBoolean 指定附件是否为文件夹的链接。Specifies whether the attachment is a link to a folder. 如果sourceUrl是指向文件夹的链接, 则必须将其设置为 true。Must set this to true if sourceUrl is a link to a folder. 可选。Optional.
isInlineisInline BooleanBoolean 如果附件显示为内嵌在嵌入对象的正文中,则设置为 true。Set to true if the attachment appears inline in the body of the embedding object. 可选。Optional.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 上次修改附件的日期和时间。The date and time when the attachment was last modified. 时间戳类型表示采用 ISO 8601 格式的日期和时间信息,始终采用 UTC 时区。The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. 例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. 可选。Optional.
namename 字符串String 显示在用于表示嵌入附件的图标下方的文本。The text that is displayed below the icon representing the embedded attachment. 这不必是实际的文件名。This does not need to be the actual file name. 必需。Required.
拒绝permission referenceAttachmentPermissionreferenceAttachmentPermission 指定通过providerType中的提供程序类型授予附件的权限。Specifies the permissions granted for the attachment by the type of provider in providerType. 可取值为:othervieweditanonymousViewanonymousEditorganizationVieworganizationEditPossible values are: other, view, edit, anonymousView, anonymousEdit, organizationView, organizationEdit. 可选。Optional.
previewUrlpreviewUrl StringString 仅适用于图像 URL 的引用附件, 以获取预览图像。Applies to only a reference attachment of an image - URL to get a preview image. 仅当sourceUrl标识图像文件时, 才使用thumbnailUrlpreviewUrlUse thumbnailUrl and previewUrl only when sourceUrl identifies an image file. 可选。Optional.
providerTypeproviderType : ReferenceattachmentproviderreferenceAttachmentProvider 支持此 contentType 的附件的提供程序的类型。The type of provider that supports an attachment of this contentType. 可取值为:otheroneDriveBusinessoneDriveConsumerdropboxPossible values are: other, oneDriveBusiness, oneDriveConsumer, dropbox. 可选。Optional.
sizesize Int32Int32 存储在引用附件的邮件上的元数据的大小 (以字节为单位)。The size of the metadata in bytes that is stored on the message for the reference attachment. 此值不表示实际文件的大小。This value does not indicate the size of the actual file. 可选。Optional.
sourceUrlsourceUrl StringString 用于获取附件内容的 URL。URL to get the attachment content. 如果这是指向文件夹的 URL, 然后在 Outlook 或 web 上的 Outlook 中正确显示该文件夹, 请将isFolder设置为 true。If this is a URL to a folder, then for the folder to be displayed correctly in Outlook or Outlook on the web, set isFolder to true. 必需。Required.
thumbnailUrlthumbnailUrl StringString 仅适用于图像 URL 的引用附件, 以获取缩略图图像。Applies to only a reference attachment of an image - URL to get a thumbnail image. 仅当sourceUrl标识图像文件时, 才使用thumbnailUrlpreviewUrlUse thumbnailUrl and previewUrl only when sourceUrl identifies an image file. 可选。Optional.

关系Relationships

None

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

{
  "contentType": "string",
  "id": "string (identifier)",
  "isFolder": true,
  "isInline": true,
  "lastModifiedDateTime": "String (timestamp)",
  "name": "string",
  "permission": "string",
  "previewUrl": "string",
  "providerType": "string",
  "size": 1024,
  "sourceUrl": "string",
  "thumbnailUrl": "string"
}