Reputation: 119
I am getting a blob image in response to an internal call to a MicroService in node ts. I want to convert it to a Base64 so that I can use it to display it in an EJS image tag.
I have tried to do it with the Buffer but the base64 it's giving me is incorrect.
response = Buffer.from(response,'binary').toString('base64');
I have also tried the FileReader but getting an error that FileReader is undefined.
Upvotes: 0
Views: 3015