I need to convert a photo into an array of bytes. I'm loading this photo with html like this:
<input class="form-control"
type="file"
name="filename"
tooltip="Buscar foto"
ng-file-select="onFileSelect($files)">
onFileSelect function saves the file in a variable of my scope. This is the code.
$scope.onFileSelect = function ($files) {
$scope.selectedFile = $files;
};
Now, I need to convert this file into an array of bytes, to display it as a picture later using data-ng-src =" data: image / png; base64, {{selectedFile}} " but i don't know how to do this. Any idea? Thanks
EDIT This is a picture of $files log.
