I receive image from server with Content-Type: image/bmp
, and need to show it on front.
I use react.js
for client side, and I don't know how to parse what I'm receiving.
I tried to use Base64
parser and put the result to img.src
but it didn't help.
let { data } = yield call(axios, requestConfig1);
data = Base64.decode(data);
const img = new Image();
img.src = data;
Also tried using data directly:
img.src = `data:image/bmp;base64,${file}`;
Didn't help. I see (unknown) in src propertry of img tag.
I want to show result as img tag.
I see respose in code like this