Freigeben über


ChannelServiceHandlerBase.OnUploadAttachmentAsync Methode

Definition

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)

Parameter

claimsIdentity
ClaimsIdentity

claimsIdentity für den Bot sollte AudienceClaim, AppIdClaim und ServiceUrlClaim aufweisen.

conversationId
String

Konversations-ID.

attachmentUpload
AttachmentData

Anlagendaten.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Aufgabe mit Ergebnis.

Hinweise

Überschreiben Sie diese Methode, um Daten in einem konformen Speicher zu speichern, wenn Sie mit Unternehmen arbeiten.

Die Antwort ist eine ResourceResponse, die eine AttachmentId enthält, die für die Verwendung mit der Attachments-API geeignet ist.

Gilt für: