Dileep Singh

Dileep Singh

  • NA
  • 46
  • 7.5k

Create object URL for the FileContent in MVC Core 3.0

Feb 28 2020 1:54 AM
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)