Język

Conversations.UploadAttachmentWithHttpMessagesAsync Metoda

Definicja

Przeciążenia

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

Parametry

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

Zwraca

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implementuje

Dotyczy

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

Parametry

conversationId
String

Identyfikator konwersacji.

attachmentUpload
AttachmentData

Dane załącznika.

customHeaders
Dictionary<String,List<String>>

Nagłówki, które zostaną dodane do żądania.

cancellationToken
CancellationToken

Token anulowania.

Zwraca

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Obiekt odpowiedzi zawierający ciało odpowiedzi oraz nagłówki odpowiedzi.

Implementuje

Wyjątki

Zrzucano, gdy operacja zwracała nieprawidłowy kod statusu.

Microsoft.Rest.SerializationException

Zrzucony, gdy nie mogę odtworzyć odpowiedzi.

Microsoft.Rest.ValidationException

Rzucane, gdy wartość wejściowa nie odpowiada oczekiwanemu typowi danych, zakresowi lub wzorcowi.

Rzucane, gdy wymagany parametr jest null.

Uwagi

Przekaż załącznik bezpośrednio do magazynu obiektów blob kanału.

Jest to przydatne, ponieważ umożliwia przechowywanie danych w zgodnym magazynie podczas pracy z przedsiębiorstwami.

Odpowiedź jest elementem ResourceResponse, który zawiera identyfikator AttachmentId, który jest odpowiedni do użycia z interfejsem API załączników.

Dotyczy