JSFiddle - React, Tailwind, and code Playground
by chovy
HTML
<form>
<input type="file" name="picture" />
<button>Upload</button>
</form>
JavaScript
$("form").submit(function(e){
e.preventDefault();
$.post('/imageupload', $(this).serialize, function(d){
console.log(d);
});
});