Partilhar via


IConversations.UploadAttachmentWithHttpMessagesAsync Método

Definição

Sobrecargas

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>>
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))

Parâmetros

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

Devoluções

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Aplica-se a

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>>
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))

Parâmetros

conversationId
String

ID de Conversação.

attachmentUpload
AttachmentData

Dados de anexo.

customHeaders
Dictionary<String,List<String>>

Os cabeçalhos que serão adicionados ao pedido.

cancellationToken
CancellationToken

O token de cancelamento.

Devoluções

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Uma tarefa que representa o Microsoft.Rest.HttpOperationResponse.

Exceções

Emitido quando a operação devolveu um código de estado inválido.

Microsoft.Rest.SerializationException

Emitido quando não é possível anular a serialização da resposta.

Microsoft.Rest.ValidationException

Emitido quando um parâmetro necessário é nulo.

Observações

Carregue um anexo diretamente para o armazenamento de blobs de um canal.

Isto é útil porque lhe permite armazenar dados num arquivo compatível ao lidar com empresas.

A resposta é um ResourceResponse que contém um AttachmentId que é adequado para utilizar com a API de anexos.

Aplica-se a