AttachmentDownloader class
A utility class for downloading input files from activity attachments.
Remarks
This class provides functionality to filter and download attachments from a turn context, supporting various content types and handling authentication for secure URLs.
Constructors
Attachment |
Creates an instance of AttachmentDownloader. This class is responsible for downloading input files from attachments. |
Methods
download |
Downloads files from the attachments in the current turn context. |
Constructor Details
AttachmentDownloader<TState>()
Creates an instance of AttachmentDownloader. This class is responsible for downloading input files from attachments.
new AttachmentDownloader()
Method Details
downloadFiles(TurnContext, TState)
Downloads files from the attachments in the current turn context.
function downloadFiles(context: TurnContext, state: TState): Promise<InputFile[]>
Parameters
- context
- TurnContext
The turn context containing the activity with attachments.
- state
-
TState
The turn state for the current conversation.
Returns
Promise<InputFile[]>
A promise that resolves to an array of downloaded input files.