Ioninput file no target in event


#1

Hi all,
I want to upload a file from the browser and added an ion-input type file. But when the change event is triggered the event variable holds no target (undefined). The input shows correctly the selected file. There are a lot of objects in the event but no target but a file is selected.

  <ion-item>
    <ion-label>
      {{ excercise.sourceMP4 }}
    </ion-label>
    <ion-input type="file" accept="video/*"  (ionChange)="changeListener($event)"></ion-input>
</ion-item>

on js side:

  changeListener($event) : void {
    console.log($event);
    console.log($event.target);//.files[0];
  }

Do I miss something?
thx,
patrik


#2

@patrikd Have you find any solution?