mirror of https://github.com/akveo/blur-admin
fix on profile image upload
parent
1f81f3b1c1
commit
0439bcf93c
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue