📜  c# web api 返回图片文件 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:47.181000             🧑  作者: Mango

代码示例1
[HttpGet]
public IActionResult Get()
{            
    Byte[] b = System.IO.File.ReadAllBytes(@"E:\\Test.jpg");   // You can use your own method over here.         
    return File(b, "image/jpeg");
}