1import * as React from "react";
2
3export class FileSelector extends React.Component<undefined, undefined>
4{
5 constructor(props: any)
6 {
7 super(props);
8 this.handleChange = this.handleChange.bind(this);
9 }
10
11 handleChange(selectorFiles: FileList)
12 {
13 console.log(selectorFiles);
14 }
15
16 render ()
17 {
18 return <div>
19 <input type="file" onChange={ (e) => this.handleChange(e.target.files) } />
20 </div>;
21 }
22}