2
Ich möchte ein QR-Code-Bild zurück zum Client anzeigen.Antwort QR-Code auf Bot-Framework mit MessagingToolkit.QRCode
Hier ist mein Code in RootDialog,
[LuisIntent("None")]
[LuisIntent("")]
public async Task None(IDialogContext context, LuisResult result)
{
string qrText = "Photo";
QRCodeEncoder enc = new QRCodeEncoder();
Bitmap qrcode = enc.Encode(qrText);
var message = context.MakeMessage();
Attachment attachment = new Attachment();
attachment.ContentType = "image/jpg";
attachment.Content = qrcode as Image; // This line is not sure...
attachment.Name = "Image";
message.Attachments.Add(attachment);
await context.PostAsync(message);
}
Ich bin nicht wirklich sicher, wie wenn ein Bildobjekt als Anlage antworten ..
Thank you very much!
Mögliches Duplikat von [Ein Bild anstelle eines Links senden] (https://stackoverflow.com/questions/39246174/send-an-image-rather-than-a-link) –