4
Answers

Create object URL for the FileContent in MVC Core 3.0

Dileep Singh

Dileep Singh

5y
981
1
This my API..
  1. [HttpGet]  
  2. public IActionResult Get()  
  3. {  
  4. Byte[] b = System.IO.File.ReadAllBytes(@"E:\\Test.jpg");  
  5. // You can use your own method over here.  
  6. return File(b, "image/jpeg");  
  7. }  
i m getting responce as File,, I am reading this responce as
 
var responce = request.Content.ReadAsByteArrayAsync().Result;
 
i want ot create Object url for this in mvc controller and wanted to set objUrl to src of image tag in View
Answers (4)