I have blob url for image and want to display it. One method I tried is by using createObjectURL().
$scope.preview = function(path) {
//path is 'data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAA....'
var file = new Blob([ path ], {
type : 'image/jpeg'
});
var fileURL = URL.createObjectURL(file);
//fileURL is blob:http://localhost:8080/a8610a32-521f-407c-8f....
console.log('fileurl: ', fileURL);
$('img.image-preview').attr('ng-src', fileURL);
}
The blobl url I am getting is by ng-file-upload 7.2.2.