【发布时间】:2018-09-04 12:10:36
【问题描述】:
我想向机器人中的用户发送一个 csv 文件附件。我正在使用 Microsoft bot 框架 C# bot builder SDK,使用网络聊天频道。我有以下内容可以向用户发送 csv 文件:
var csvPath = "D://ProjecteFile/Results.csv";
//Attachment attachment = new Attachment();
//attachment.ContentType = "text/csv";
//attachment.ContentUrl = csvPath;
//attachment.Name = "click this link to get server report";
//return attachment;
我也试过用英雄卡
var heroCard = new HeroCard {
Title = "Click to download Report",
Buttons = new List < CardAction > {
new CardAction(ActionTypes.OpenUrl, "Get Started", value: "file://L-156222101/ProjectFile)")
};
return heroCard.ToAttachment();
}
我的机器人有没有办法通过网络聊天向用户发送 csv 文件?
【问题讨论】:
标签: c# asp.net .net botframework bots