ConversationsExtensions.UploadAttachmentAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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)
Parameters
- operations
- IConversations
- conversationId
- String
- attachmentUpload
- AttachmentData
- cancellationToken
- CancellationToken
Returns
Applies to
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)
Parameters
- operations
- IConversations
The operations group for this extension method.
- conversationId
- String
Conversation ID.
- attachmentUpload
- AttachmentData
Attachment data.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The ResourceResponse.
Remarks
Upload an attachment directly into a channel's blob storage.
This is useful because it allows you to store data in a compliant store when dealing with enterprises.
The response is a ResourceResponse which contains an AttachmentId which is suitable for using with the attachments API.