botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Set image to Herocard/Thumbnail card from local folder

Open chetanmekha opened this issue 9 years ago • 5 comments

Hello Team, I want to set image/picture to Herocard/Thumbnail card from my local folder. How can I do it? Please help me on the same.

chetanmekha avatar Jan 13 '17 07:01 chetanmekha

Hi @chetanmekha, you have two options.

  1. You can load the file into memory and use the Attachments API to upload it to the channel.
  2. If the file is small enough, you can turn it into a base64 blob and embed it as a base64 data URI. This page shows a URI like that: https://docs.botframework.com/en-us/core-concepts/attachments/ (search for "base64" to see how it's rendered into the Activity)

dandriscoll avatar Jan 17 '17 20:01 dandriscoll

Hi @chetanmekha, I'm assuming @dandriscoll's answer helped you out, so I'm closing this issue. Feel free to reopen it if this is not the case. Thanks!

Andrea-Orimoto avatar Feb 14 '17 19:02 Andrea-Orimoto

@dandriscoll Is it not possible to set base 64 image to herocard in the facebook channel. Its working fine in emulator but not working in fb

PrasadGautham avatar Jul 13 '17 08:07 PrasadGautham

@PrasadGautham does facebook support base64 attachments?

JasonSowers avatar Jul 13 '17 16:07 JasonSowers

Hi! Just put the full-path. thats work for me.

gucompi avatar Mar 28 '18 16:03 gucompi