IConversations.UploadAttachmentWithHttpMessagesAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
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>>
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
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>>
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
Zadanie reprezentujące Microsoft.Rest.HttpOperationResponse.
Wyjątki
Zgłaszany, gdy operacja zwróciła nieprawidłowy kod stanu.
Zgłaszany, gdy nie można wykonać deserializacji odpowiedzi.
Zgłaszany, gdy wymagany parametr ma wartość 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ź to resourceResponse, który zawiera identyfikator AttachmentId, który jest odpowiedni do użycia z interfejsem API załączników.