Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #web #api #return #image #file
ADD COMMENT
Topic
Name
4+2 =