TeamsAttachmentDownloader class

Warning

This API is now deprecated.

Use M365AttachmentDownloader from @microsoft/agents-hosting instead.

Extends

Constructors

TeamsAttachmentDownloader(string, OutboundUrlPolicy)

Creates an attachment downloader.

Inherited Methods

downloadAndStoreFiles(TurnContext, TurnState)

Downloads files from the attachments in the current turn context and stores them in state.

downloadFiles(TurnContext)

Download any files relative to the current user's input.

Constructor Details

TeamsAttachmentDownloader(string, OutboundUrlPolicy)

Creates an attachment downloader.

new TeamsAttachmentDownloader(stateKey?: string, outboundHostValidator?: OutboundUrlPolicy)

Parameters

stateKey

string

Turn-state key used by downloadAndStoreFiles.

outboundHostValidator
OutboundUrlPolicy

Policy used to validate attachment download URLs.

Inherited Method Details

downloadAndStoreFiles(TurnContext, TurnState)

Downloads files from the attachments in the current turn context and stores them in state.

function downloadAndStoreFiles(context: TurnContext, state: TurnState): Promise<void>

Parameters

context
TurnContext

The turn context containing the activity with attachments.

state
TurnState

The turn state to store the files in.

Returns

Promise<void>

A promise that resolves when the downloaded files are stored.

Inherited From M365AttachmentDownloader.downloadAndStoreFiles

downloadFiles(TurnContext)

Download any files relative to the current user's input.

function downloadFiles(context: TurnContext): Promise<InputFile[]>

Parameters

context
TurnContext

Context for the current turn of conversation.

Returns

Promise<InputFile[]>

Promise that resolves to an array of downloaded input files.

Inherited From M365AttachmentDownloader.downloadFiles