JSFiddle - React, Tailwind, and code Playground
by Martin Durec
HTML
<input type="file" />
<img id="button" src="http://www.kafkabrigade.org.uk/wp-content/uploads/2011/07/button-pic.jpg" />
CSS
input[type=file] {
display:block;
height:0;
width:0;
}
JavaScript
$('#button').click(function() {
$('input[type=file]').trigger('click');
});
$('input[type=file]').change(function() {
$('input[type=text]').val($(this).val());
});