Attachment not working in Microsoft Team: Bot framework v3

644 views Asked by At

I am writing a bot using C# and I'm able to see a png image in Emulator, but in Microsoft Teams chat, it's showing like not found image path.

Here is the simple reply attachment bot code:

message.Attachments = new List<Attachment>();
                            message.Attachments.Add(
                                new Attachment()
                                {
                                    ContentUrl = "https://docs.botframework.com/en-us/images/faq-overview/botframework_overview_july.png",
                                    ContentType = "image/png",
                                    Name = filteredPolicy.Filename
                                }
                            );
                            await context.PostAsync(message);    

Reference: Screen shots of my both Bot Emulator and Microsoft't Team

Bot Emulator showing image

Microsoft team not displaying image

Note: Even for PDF attachement, the emulator it's showing pdf file link, but not Microsoft Team.

0

There are 0 answers