I need to get the full file name using directive with angularjs , Bellow is my code, here I am only getting file name. Is it possible to get the full file name?
<input type="file" fileread="justice.imageLocation" />
MyApp.directive('fileread', [function(){
return {
scope: {
fileread:"="
},
link: function (scope, element, attributes) {
element.bind("change", function (changeEvent) {
scope.$apply(function () {
// I am getting file name here!
scope.fileread = changeEvent.target.files[0].name;
});
});
}
}
}]);