Hi folks,
Here is my code as below:
[HttpGet("Download/{id}")] public FileStreamResult ([FromRoute] int id) { var getFile = _context.UploadPoliceReports.FirstOrDefault(m => m.UserVehicleID == id); //var getFile = _context.UploadPoliceReports.where(m => m.UserVehicleID == id); MemoryStream ms = new MemoryStream(getFile.Data); return new FileStreamResult(ms, getFile.ContentType); }
I am getting only one image file (Dino11.jpg) and it seems good.
Now I want to display all images (Dino11 and Dino22) from database where UserVehicleID has two same ID with different images.
Any idea?
I am waiting for your response.
Thanks in advance!