Share via


TeamsAttachmentDownloader class

Warning

This API is now deprecated.

Use M365AttachmentDownloader from @microsoft/agents-hosting instead.

Extends

Constructors

TeamsAttachmentDownloader(string)

Inherited Methods

downloadAndStoreFiles(TurnContext, TurnState<DefaultConversationState, DefaultUserState>)

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)

new TeamsAttachmentDownloader(stateKey?: string)

Parameters

stateKey

string

Inherited Method Details

downloadAndStoreFiles(TurnContext, TurnState<DefaultConversationState, DefaultUserState>)

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

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

Parameters

context
TurnContext

The turn context containing the activity with attachments.

state

TurnState<DefaultConversationState, DefaultUserState>

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