title: How to fix property file is undefined in ion-input type file
body: <p>I'm developing Ionic 3 mobile app and I want to upload images from the mobile app to web API. For that, I'm using POST method to send the image. I'm trying to upload the image as a multipart file because the server is expecting a multipart file. Therefore I added an input field to choose the file such as. Next, I created the <code>changeListener()</code> event to send the image to the server.</p>
  
  <pre><code>&lt;ion-input type="file" accept="image/*" id="upload" [(ngModel)]="imagePath" (ionChange)="changeListener($event)"&gt;&lt;/ion-input&gt;
  
  
  changeListener($event): void {
       this.imagePath = $event.target.files[0];
       console.log($event.target.files[0])
       this.imageProvider.uploadImage(this.imagePath)
  }
  </code></pre>
  
  <p>When I choose the file it's giving me a typeError such as "cannot read the property file of undefined".
  Can anyone help with this problem?</p>