input onchange react type file code example
Example: input onchange react type file
import * as React from "react";
export class FileSelector extends React.Component
{
constructor(props: any)
{
super(props);
this.handleChange = this.handleChange.bind(this);
}
handleChange(selectorFiles: FileList)
{
console.log(selectorFiles);
}
render ()
{
return
this.handleChange(e.target.files) } />
;
}
}