I want to send a csv file attachment to to user in bot. I am using the Microsoft bot framework C# bot builder SDK, using the web chat channel. I've the following to send a csv file to the user:
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;
I also tried using a hero card
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();
}
Is there any way for my bot to send a csv file to a user by via web chat?
