fix on profile image upload

pull/386/head
Henrique Schmitt 2018-03-26 15:58:22 -03:00
parent 1f81f3b1c1
commit 0439bcf93c
2 changed files with 3 additions and 3 deletions

View File

@ -76,8 +76,8 @@
});
};
$scope.getFile = function () {
fileReader.readAsDataUrl($scope.file, $scope)
$scope.getFile = function (file) {
fileReader.readAsDataUrl(file, $scope)
.then(function (result) {
$scope.picture = result;
});

View File

@ -10,7 +10,7 @@
link: function ($scope, el) {
el.bind('change', function (e) {
$scope.file = (e.srcElement || e.target).files[0];
$scope.getFile();
$scope.getFile($scope.file);
})
}
}