168-multi-file-upload-angular-firebase icon indicating copy to clipboard operation
168-multi-file-upload-angular-firebase copied to clipboard

uploader.component.html:19 - error TS2339: Property 'files' does not exist on type 'EventTarget'.

Open YLYS opened this issue 3 years ago • 1 comments

Thank you for sharing your code. But it's code has some issues: uploader.component.html:19:76 - error TS2339: Property 'files' does not exist on type 'EventTarget'. <input class="file-input" type="file" (change)="onDrop($event.target.files)"> How to fix it? Thx.

YLYS avatar Apr 04 '22 18:04 YLYS

I won't call it a clean way of doing it, but it works.

<input
  class="file-input"
  type="file"
  accept="image/*"
  (change)="onDrop($any($event).target.files)"
/>

Credit: @akhromieiev

Jood80 avatar Apr 17 '22 15:04 Jood80