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