My persona has an attribute retrieved from MongoDB known as "faceDetection.photo", which is an array of values. Here is a snippet of the code:
persona.faceDetection.photo=[255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,1....etc]
var encodedData = window.btoa(persona.faceDetection.photo);
persona.faceDetection.photo=encodedData;
I am trying to display this image using AngularJS like this:
<img data-ng-src="data:image/jpeg;base64,{{newPersona.faceDetection.photo}}" /img>
However, nothing is being displayed. Is there a simpler way to achieve this?
PD: I apologize for my English and coding skills, I'm very new to this.