A block of Html template looks something like this,
<div class="field" style="padding:1%">
<label>Ledger Sample Copies</label>
<input type="file" formControlName="savingsfile" [(ngModel)]="category.filepath" (change)= "FilePathHandler($event)" >
</div>
and my respective component method looks like this,
FilePathHandler(fileName) {
console.log("Files :",fileName.target.value);
console.log("Files :",this.category.filepath);
}
I am trying to print and insert the path of any document selected from the file input into a database table.
But i am not able to display the filepath in the console.log.
The example output i got for the console logs are below,
Files : C:\fakepath\linux_java_eclipse.txt Files : undefined
I want to display the actual path of the file not with any fakepath.
could someone please help me out ?
I am working on ubuntu 7.14 machine if that helps out.