I am trying to return image as response to http POST request. Image should be returned in payload of http response. Response string:
When convert this string to Blob and save, result file is not valid. Converting code:
const blob = new Blob([data], { type: headers['content-type'] });
I finnaly find out reason. To download blob you have to specify that response payload is binary. Example for axios:
axios.post(endpoint, formData, {
responseType: 'blob'
})