I have images stored in database as Binary Data ,I wanna return this image for client to display them but the problem is code that I've written return json data not the image, how could i return the image as its for the client in .NET Core 3.1 with Angular 8
//note document is the column of my image Here is my code :
public async Task<dynamic> GetImage(int id)
{
string imageBase64Data =Convert.ToBase64String(_repository.Get(id).document);
string imageDataURL =string.Format("data:image/jpg;base64,{0}",imageBase64Data);
return imageDataURL;
}
I'm using ABP framework and my class is ApplicationService Base Class