Language

AgentHostExtensions.AddAgentAttachmentDownloader Method

Definition

Registers the AttachmentDownloader for non-Teams channels. This downloader handles standard HTTP attachment URLs.

public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentAttachmentDownloader(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder);
static member AddAgentAttachmentDownloader : Microsoft.Extensions.Hosting.IHostApplicationBuilder -> Microsoft.Extensions.Hosting.IHostApplicationBuilder
<Extension()>
Public Function AddAgentAttachmentDownloader (builder As IHostApplicationBuilder) As IHostApplicationBuilder

Parameters

builder
IHostApplicationBuilder

The host application builder.

Returns

The same builder for chaining.

Remarks

This is a convenience method equivalent to:

builder.AddAgentFileDownloader(new AttachmentDownloader(httpClientFactory));

The IHttpClientFactory dependency is resolved at runtime from DI. This method should only be called once.

Applies to