In my react component I have :
state = { title: '', content: '', file: '' } handleChange = (e) => { this.setState({ [e.target.id] : e.target.value }) } handleSubmit = (e) => { e.preventDefault(); console.log(this.state) } <form onSubmit={this.handleSubmit}> <input type="text" id="title" onChange={this.handleChange}/> <textarea id="content" onChange={this.handleChange}></textarea> <input type="file" id="file" onChange={this.handleChange}/> </form> and i am getting in console.log(this.state) only path to file, like : "C:\fakepath\title.jpg". How to set to state actual file? Thanks for help in advance!