Attachment files in personal chats can be conveniently downloaded using the URL provided in context.activity.attachments[i].content.downloadUrl. No authentication token is required for this download url.
The contentUrl of attachment files in group or channel chats leads to a SharePoint webUrl. This SharePoint webUrl cannot be directly use for file downloads.
Can TeamsAttachmentDownloader be extended to support the download of other attachment types?
Reproduction Steps
1. Upload file in Teams
2. The `teams-ai` SDK throw an error
Yeah I only implemented images because that’s all that OpenAI supports. Adding support for any type of attachment was what I envisioned I just ran out of time.
Language
Javascript/Typescript
Version
latest
Description
There are a lot of kinds of attachments in Teams. For example:
Currently,
TeamsAttachmentDownloader
inteams-ai
SDK only supports the download of inline images.https://github.com/microsoft/teams-ai/blob/913423b84528e30749f03805459546e29b0e292d/js/packages/teams-ai/src/TeamsAttachmentDownloader.ts#L76 The
TeamsAttachmentDownloader
relies on the contentUrl to download files. But it doesn't work for attachment files.context.activity.attachments[i].content.downloadUrl
. No authentication token is required for this download url.Can
TeamsAttachmentDownloader
be extended to support the download of other attachment types?Reproduction Steps