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 () { $scope.getFile = function (file) {
fileReader.readAsDataUrl($scope.file, $scope) fileReader.readAsDataUrl(file, $scope)
.then(function (result) { .then(function (result) {
$scope.picture = result; $scope.picture = result;
}); });

View File

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