ChannelServiceHandlerBase.OnUploadAttachmentAsync 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.
UploadAttachment() API.
protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> OnUploadAttachmentAsync (System.Security.Claims.ClaimsIdentity claimsIdentity, string conversationId, Microsoft.Bot.Schema.AttachmentData attachmentUpload, System.Threading.CancellationToken cancellationToken = default);
abstract member OnUploadAttachmentAsync : System.Security.Claims.ClaimsIdentity * string * Microsoft.Bot.Schema.AttachmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
override this.OnUploadAttachmentAsync : System.Security.Claims.ClaimsIdentity * string * Microsoft.Bot.Schema.AttachmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
Protected Overridable Function OnUploadAttachmentAsync (claimsIdentity As ClaimsIdentity, conversationId As String, attachmentUpload As AttachmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)
Parameters
- claimsIdentity
- ClaimsIdentity
claimsIdentity for the bot, should have AudienceClaim, AppIdClaim and ServiceUrlClaim.
- conversationId
- String
Conversation ID.
- attachmentUpload
- AttachmentData
Attachment data.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
task with result.
Remarks
Override this method 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.