I'm converting a Memory steam to a byte array and encoding it ToBase64String
return Ok(Convert.ToBase64String(memoryStream.ToArray()));
On the client side i'm doing the following to display the image
var response = await client.GetAsync(Navigator.BaseUri+ "upload/process");
if (response.IsSuccessStatusCode)
{
imagesrc = string.Format("data:image/jpeg;base64,{0}", response.Content.ToString());
StateHasChanged();
}
But the image is not getting displayed, it gives the following error
Failed to load resource: net::ERR_INVALID_URL
Update: This how the image is set
<img src="@imagesrc" width="300px" height="300px" style="border: 1px solid #4f4f50; border-radius: 1px" />