====# 19st July Report ## Progress **08:20** - Entering BMW Lab. ### Add function to Add Picture In html add. ```htmlmixed= <ion-button *ngIf="!inputCamera" expand="full" (click)="compleRepair()">Comple Repair</ion-button> <ion-button *ngIf="inputCamera" expand="full" (click)="imageInput.click()">Comple Repair</ion-button> <input type="file" id="file-input" accept="image/*;capture=camera" style="display: none;" (change)="uploadImage($event)" multiple #imageInput> ``` In type script add. ```typescript= inputCamera = false; image: any = []; reader: any = [] uploadImage(event) { // called each time file input changes console.log(event.target.files.FileList); if (event.target.files) { for (let i = 0; i < event.target.files.length; i++) { this.reader[i] = new FileReader(); this.reader[i].readAsDataURL(event.target.files[i]); // read file as data url this.reader[i].onload = (event) => { // called once readAsDataURL is completed this.image[i] = this.reader[i].result; } } console.log(this.image); } } ``` #### Result <center> <img src="https://imgur.com/NJHG7La.png" stye="height" 300px> </center> <br> **18:00** - Leave BMW Lab. ###### tags: `on-intern`====