ASP.MVC return image doesn't work in BBCODE
i have some simple code
public virtual ActionResult Get(int id)
{
using (var db = new ImagesEntities())
{
var b = db.Images.SingleOrDefault(bo => bo.Id == id);
return File("C:\\images\\" + b.FileName, "image/jpeg");
}
}
It works in html for example < img src开发者_高级运维="http://mysite.com/mycontroler/Get/1" />
but on some forums with BBCode it doesnt work and returns plain text instead of image
any help?
Url must ends with '.jpg', '.png' etc....
精彩评论