Browsers don\'t take full path of local disc, instead they concatenate the filename with fakepath. Is there any way to access the file (image) from fakepath using typescript
This should do what you want:
readUrl(event:any) { if (event.target.files && event.target.files[0]) { var reader = new FileReader(); reader.onload = (event: ProgressEvent) => { this.url = (event.target).result; } reader.readAsDataURL(event.target.files[0]); } }