in src/components/PhotosAdmin.js [119:138]
render() {
return (
<Fragment>
<section className="section">
<div className="container">
<div className="App">
<h2>Upload a new photo</h2>
<input
type="file"
accept="image/png, image/jpeg"
style={{ display: 'none' }}
ref={ref => (this.upload = ref)}
onChange={() =>
this.setState({
imageFile: this.upload.files[0],
imageName: this.upload.files[0].name
})
}
/>
<input value={this.state.imageName} placeholder="Select file" onChange={(e) => {this.handleChange(e);}} />