-1

I am returning a file result in base64 format:

string stream = this.userManagementRepository.getphotbytes(photoIdUrl);
return this.File(stream, System.Net.Mime.MediaTypeNames.Application.Octet,"file.png");

I am binding it like this:

$("#photoIdStreamImg_" + userid).attr("src", Result);

The image not visible at all. Please help with this issue.

Rory McCrossan
  • 306,214
  • 37
  • 269
  • 303

1 Answers1

1

I dont think you are returning base64 there. Base64 is a simple string.

Try using the Convert namespace, and use

Convert.ToBase64String

Look up for more info here!

MKougiouris
  • 2,308
  • 1
  • 12
  • 16