2

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.

Praveen R
  • 699
  • 2
  • 7
  • 23
  • 1
    To send pdf/doc link to the user,I have achieved it by `string messageText = "![Sample Image](http://aka.ms/Fo983c)"; await context.PostAsync(messageText);` – Praveen R Dec 16 '16 at 05:48
  • We're unable to recreate this issue. This code is virtually identical to the SendAttachmentBot sample, and even when modifying that to mimic your code (except for your *Name*) we're seeing the image in both the Emulator, Client and Web version. Are you still seeing the issue? – Rich Moe - Microsoft Dec 16 '16 at 19:38
  • @RichMoe-Microsoft I'm facing a similar issue while trying to show an excel attachment (ie: ContentType = "application/excel") in Teams. Do we have any workaround for this one ? – Hari Oct 13 '20 at 12:10

0 Answers0