ConversationsExtensions.UploadAttachmentAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UploadAttachmentAsync(IConversations, String, AttachmentData, CancellationToken) | |
UploadAttachmentAsync(IConversations, String, AttachmentData, CancellationToken) |
UploadAttachment。 |
UploadAttachmentAsync(IConversations, String, AttachmentData, CancellationToken)
public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> UploadAttachmentAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Connector.AttachmentData attachmentUpload, System.Threading.CancellationToken cancellationToken = default);
static member UploadAttachmentAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Connector.AttachmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function UploadAttachmentAsync (operations As IConversations, conversationId As String, attachmentUpload As AttachmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)
参数
- operations
- IConversations
- conversationId
- String
- attachmentUpload
- AttachmentData
- cancellationToken
- CancellationToken
返回
适用于
UploadAttachmentAsync(IConversations, String, AttachmentData, CancellationToken)
UploadAttachment。
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> UploadAttachmentAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Schema.AttachmentData attachmentUpload, System.Threading.CancellationToken cancellationToken = default);
static member UploadAttachmentAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Schema.AttachmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function UploadAttachmentAsync (operations As IConversations, conversationId As String, attachmentUpload As AttachmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)
参数
- operations
- IConversations
此扩展方法的操作组。
- conversationId
- String
对话 ID。
- attachmentUpload
- AttachmentData
附件数据。
- cancellationToken
- CancellationToken
取消标记。
返回
注解
将附件直接上传到通道的 Blob 存储中。
这很有用,因为它允许你在处理企业时将数据存储在合规的存储中。
响应是 ResourceResponse,其中包含适合与附件 API 一起使用的 AttachmentId。