Dela via


Conversations.UploadAttachmentWithHttpMessagesAsync Metod

Definition

Överlagringar

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

Parametrar

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

Returer

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implementeringar

Gäller för

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

Parametrar

conversationId
String

Konversations-ID.

attachmentUpload
AttachmentData

Bifogade filer.

customHeaders
Dictionary<String,List<String>>

Rubriker som läggs till i begäran.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Ett svarsobjekt som innehåller svarstexten och svarsrubrikerna.

Implementeringar

Undantag

Genereras när åtgärden returnerade en ogiltig statuskod.

Microsoft.Rest.SerializationException

Returneras när det inte går att deserialisera svaret.

Microsoft.Rest.ValidationException

Genereras när ett indatavärde inte matchar den förväntade datatypen, intervallet eller mönstret.

Genereras när en obligatorisk parameter är null.

Kommentarer

Ladda upp en bifogad fil direkt till en kanals bloblagring.

Detta är användbart eftersom det gör att du kan lagra data i ett kompatibelt lager när du hanterar företag.

Svaret är ett ResourceResponse som innehåller ett AttachmentId som är lämpligt för användning med API:et för bifogade filer.

Gäller för