简体   繁体   中英

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?

网址必须以“ .jpg”,“。png”等结尾。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM