IChannelApiHandler.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.
public System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse> OnUploadAttachmentAsync(System.Security.Claims.ClaimsIdentity claimsIdentity, string conversationId, Microsoft.Agents.Connector.Types.AttachmentData attachmentUpload, System.Threading.CancellationToken cancellationToken = default);
abstract member OnUploadAttachmentAsync : System.Security.Claims.ClaimsIdentity * string * Microsoft.Agents.Connector.Types.AttachmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse>
Public 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 Agent, should have AudienceClaim, AppIdClaim and ServiceUrlClaim.
- conversationId
- String
Conversation ID.
- attachmentUpload
- AttachmentData
Attachment data.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
task with result.
Remarks
The response is a ResourceResponse which contains an AttachmentId which is suitable for using with the attachments API.