Question: 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)

Answer: 
There is an issue with input type file in AngularJs . <https://github.com/angular/angular.js/issues/1375>

Try to create your own directive for input type file : See The Solutions --

[ng-model not working with file input](https://stackoverflow.com/questions/35036658/ng-model-not-working-with-file-input)
I had this same issue and found some good answers on S.O. You'll need to use a directive to bind the file to your ng-model. Here's the link: 
[ng-model for <input type="file"/>](https://stackoverflow.com/questions/17063000/ng-model-for-input-type-file)