Answers for "c# web api return image file"

C#
2

c# web api return image file

[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");
}
Posted by: Guest on October-12-2020

C# Answers by Framework

Browse Popular Code Answers by Language