I need to get the file using $ http.get. The data is returned as an application / octet stream. But I know that this file is an image.
How can I display this file as an image?
I tried
var nuroImage = new Image();
nuroImage.onload = function {
scope.imageSrc = this.src;
}
$http(req).then(
funciton(response) {
nuroImage.src = "data:application/octet-stream," + response.data
}
I get 200ok, but the image is not displayed
Is it possible to convert octet stream to jpeg / png?
doron source
share