Partager via


Conversations.UploadAttachmentWithHttpMessagesAsync Méthode

Définition

Surcharges

UploadAttachmentWithHttpMessagesAsync(String, AttachmentData, Dictionary<String,List<String>>, CancellationToken)
UploadAttachmentWithHttpMessagesAsync(String, AttachmentData, Dictionary<String,List<String>>, CancellationToken)

UploadAttachment.

UploadAttachmentWithHttpMessagesAsync(String, AttachmentData, Dictionary<String,List<String>>, CancellationToken)

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>> UploadAttachmentWithHttpMessagesAsync (string conversationId, Microsoft.Bot.Connector.AttachmentData attachmentUpload, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAttachmentWithHttpMessagesAsync : string * Microsoft.Bot.Connector.AttachmentData * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>>
override this.UploadAttachmentWithHttpMessagesAsync : string * Microsoft.Bot.Connector.AttachmentData * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>>
Public Function UploadAttachmentWithHttpMessagesAsync (conversationId As String, attachmentUpload As AttachmentData, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))

Paramètres

conversationId
String
attachmentUpload
AttachmentData
customHeaders
Dictionary<String,List<String>>
cancellationToken
CancellationToken

Retours

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implémente

S’applique à

UploadAttachmentWithHttpMessagesAsync(String, AttachmentData, Dictionary<String,List<String>>, CancellationToken)

UploadAttachment.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>> UploadAttachmentWithHttpMessagesAsync (string conversationId, Microsoft.Bot.Schema.AttachmentData attachmentUpload, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadAttachmentWithHttpMessagesAsync : string * Microsoft.Bot.Schema.AttachmentData * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>>
override this.UploadAttachmentWithHttpMessagesAsync : string * Microsoft.Bot.Schema.AttachmentData * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>>
Public Function UploadAttachmentWithHttpMessagesAsync (conversationId As String, attachmentUpload As AttachmentData, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))

Paramètres

conversationId
String

ID de conversation.

attachmentUpload
AttachmentData

Données de pièce jointe.

customHeaders
Dictionary<String,List<String>>

En-têtes qui seront ajoutés à la demande.

cancellationToken
CancellationToken

Jeton d'annulation.

Retours

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Objet de réponse contenant le corps de la réponse et les en-têtes de réponse.

Implémente

Exceptions

Levée lorsque l’opération a retourné un code d’état non valide.

Microsoft.Rest.SerializationException

Levée en cas d’impossibilité de désérialiser la réponse.

Microsoft.Rest.ValidationException

Levée lorsqu’une valeur d’entrée ne correspond pas au type de données, à la plage ou au modèle attendu.

Levée lorsqu’un paramètre requis est null.

Remarques

Chargez une pièce jointe directement dans le stockage d’objets blob d’un canal.

Cela est utile, car il vous permet de stocker des données dans un magasin conforme lorsque vous traitez avec des entreprises.

La réponse est une ResourceResponse qui contient un AttachmentId qui peut être utilisé avec l’API pièces jointes.

S’applique à