JSFiddle - React, Tailwind, and code Playground
HTML
<input type="file" id="myInput">
<div class="ctn">
<span class="bold">mimetype:</span><span id="result"></span>
</div>
CSS
.ctn {
margin-top: 20px;
}
.bold {
font-weight: bolder;
margin-right: 4px;
}
JavaScript
myInput.onchange = function() {
result.innerHTML = this.files[0].type;
}