我有一些简单的代码
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");
}
}
它在 html 中工作,例如 < img src="http://mysite.com/mycontroler/Get/1" />
但是在一些带有 BBCode 的论坛上它不起作用并返回纯文本而不是图像
有什么帮助吗?