I'm "Reactifying" a file input and can't manage to iterate over selected files.
private onInputChanged = (e: React.FormEvent<HTMLInputElement>): void => {
let files: FileList | null = e.currentTarget.files;
files.map( file => console.log("Do something with " + file.name));
}
<input
type="file"
onChange={this.onInputChanged}
/>
Here is a barebone example of my problem. FileList cannot be used with .map(... and neither .forEach(...
How can I accomplish an iteration on selected files?
Error: Property 'map' does not exist on type 'FileList'