Wednesday, October 18, 2017

Blob image display HTML using Angular.js

I stored image in MySQL with the blob datatype. Now I am getting response rs like 59e5dfa826ea3.png in Angular. How can I get rs to base64 like this using Angular:

data/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANIAAAAziVBORw0KGgoAAAANSUhEUgAAANIAAAAziVBORw0KGgoAAAANSUhEUgAAANIAAAAziVBORw0KGgoAAAANSUhEUgAAANIAAAAziVBORw0KGgoAAAANSUhEUgAAANIAAAAz.

I stored in blob, image is HTML5 canvas sign image database.

$http({
    method: "GET",
    url: "xyx.php"
}).then(function (response) {
    var data = response.data;
    var rs = data[0].img;
})

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/10/18/blob-image-display-html-using-angular-js/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment