when ever i choose a file for example image2.jpg i want that no file choosen text to change into the filename
<input type="file"onChange={this.onChange} value={this.state.allValues.BloodReport} />
full code i have put in codesand box
when ever i choose a file for example image2.jpg i want that no file choosen text to change into the filename
<input type="file"onChange={this.onChange} value={this.state.allValues.BloodReport} />
full code i have put in codesand box
Use it without value property. name will be showed automaically.
<input type="file"onChange={this.onChange} />
Remove value
from <input type="file" />
then try !
<input
style={styles.cutumbuttons}
type="file"
style={styles.cutumbuttons}
name="ultraSound"
// accept="application/pdf"
onChange={this.onChange}
//value={this.state.allValues.BloodReport}
/>