I am creating a web app in mvc-5 with angularjs
here I have the following div
<div class="row form-clearify" style="margin-top:3px;">
<div class="col-md-6 col-sm-6 col-xs-12" style="background-color:whitesmoke;">
<label>Upload Your Photo</label>
<input type="file" ng-model="mdphoto" class="form-control" />
</div>
</div>
<div class="row form-clearify" style="margin-top:3px;">
<div class="col-md-6 col-sm-6 col-xs-12" style="background-color:whitesmoke;">
<label>Login Id</label>
<input type="text" class="form-control" ng-change="filepath()" ng-model="mdlogin" />
</div>
</div>
this is my div
<input type="file" ng-model="mdphoto" class="form-control" />
this input field will open my file dialogue and on ng-change="filepath()" id did the following coding
$scope.filepath = function () {
console.log($scope.mdphoto);
}
I am printing the data which is coming from my file dialogue(I want url of the files)
but undefined is printing on my web page(console)
what I need to do is, I want file path of the selected file(with filename)