We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4542b2c commit 1af1bfdCopy full SHA for 1af1bfd
README.md
@@ -20,17 +20,17 @@ var React = require('react'),
20
FileInput = require('react-file-input');
21
22
var Form = React.createClass({
23
- handleChange: function(file) {
24
- console.log(file, 'selected!');
+ handleChange: function(event) {
+ console.log('Selected file:', event.target.files[0]);
25
},
26
27
render: function() {
28
return (
29
<form>
30
- <FileInput name="myImage"
31
- accept=".png,.gif"
32
- placeholder="My Image"
33
- className="inputClass"
+ <FileInput name="myImage"
+ accept=".png,.gif"
+ placeholder="My Image"
+ className="inputClass"
34
onChange={this.handleChange} />
35
</form>
36
);
0 commit comments