Closed heyitsaamir closed 2 days ago
closes: #1789
If download_url is available, it uses that to download the corresponding file in TeamsAttachmentDownloader. This is using the guidance here: https://devblogs.microsoft.com/microsoft365dev/working-with-files-in-your-microsoft-teams-bot/
Looks like a similar
Describe your changes, with screenshots and code snippets as appropriate
Looks like similar logic is in the C# codebase too: https://github.com/microsoft/teams-ai/blob/0534743ff7a65d7e8718111a53c0afee22179a4b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Application/TeamsAttachmentDownloader.cs#L83
I added a unit test and also tested it locally by sending myself a markdown file. Without this change, I got a 403 error. With this, the file was successfully downloaded.
Thanks for finding this bug and resolving it, @heyitsaamir!
Linked issues
closes: #1789
Details
If download_url is available, it uses that to download the corresponding file in TeamsAttachmentDownloader. This is using the guidance here: https://devblogs.microsoft.com/microsoft365dev/working-with-files-in-your-microsoft-teams-bot/
Change details
Looks like a similar
Looks like similar logic is in the C# codebase too: https://github.com/microsoft/teams-ai/blob/0534743ff7a65d7e8718111a53c0afee22179a4b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Application/TeamsAttachmentDownloader.cs#L83
I added a unit test and also tested it locally by sending myself a markdown file. Without this change, I got a 403 error. With this, the file was successfully downloaded.