Sprache

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

Unterhaltungs-ID.

attachmentUpload
AttachmentData

Anlagendaten.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Vorgang mit Ergebnis.

Hinweise

Überschreiben Sie diese Methode, um Daten in einem kompatiblen Speicher zu speichern, wenn es um Unternehmen geht.

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

Gilt für: