I need to take a photo and when I press the button this photo is sent to my server so I save it to my bank on base 64, I just can not get the photo and convert to Buffer . My code:
(function() {
'use strict';
angular
.module('meetClass')
.controller('NovaFotoController', NovaFotoController);
/** @ngInject */
function NovaFotoController($scope) {
$scope.pular = function(){
console.log("Pula")
}
$scope.cadastraFoto = function(){
}
}
})()
Html
<div class="divContentLogin">
<form action="">
<h3 style="color:#ffffff">Cadastrar Foto</h3>
<div layout="column" style="margin-top: 10px;">
<div class="inputsDadosLogin">
<input mdInput type="file" id="fotoPerfil" class="colorInput" accept=".jpg, .jpeg, .png">
</div>
</div>
<br>
<md-button class="md-raised" ng-click="pular()">Pular</md-button>
<md-button class="md-raised" ng-click="cadastraFoto()">Cadastrar</md-button>
</form>
</div>
If you have any way to get this input from this input, this loaded photo convert to Buffer will help me a lot, or some other workaround.