I am building a HeroCard containing a CardImage which must show an image. Up until now I was using
HeroCard hcBody = new HeroCard
{
Text = "IMG",
Images = new List<CardImage> {
new CardImage(url: $"https://www.example.com/Pictures/" + picNo + ".jpg") },
Buttons = new List<CardAction> {
new CardAction(ActionTypes.ImBack, "SELECT"+picNo , value: picvalue) },
};
msg.Attachments.Add(hcBody.ToAttachment());
This is the HeroCard with a text,the image loaded from a URL adding the image number dynamically and at the end its type. Then I am adding a button with an action,text and value
Now the issue is that I need to load the images from the project's path. I tried to achieve it by
var picPath=System.Configuration.ConfigurationManager.AppSettings["picServerPath"];
and modifying the CardImage url to
Images = new List<CardImage> { new CardImage(url: picPath+ picNo + ".jpg") }
Using a logger I saw that the built path is correct, the HeroCard shows up but the images are missing. So I guess the URL of the CardImage needs to be created in a different way if I want to use the project's path on the server?