Use a label:
div{
position:relative;
}
input{
display:none;
}
<div>
<input class="form-control" type="file" value="Seleccionar documento" id="upload">
<label for="upload"><button onclick="this.parentElement.previousElementSibling.click()">Choose File</button> Select document</label>
</div>
To show file names, we can use JS to add a change
event listener to the input field that updates the label:
upload.addEventListener("change", function(){
document.querySelector('label span').innerText = this.files[0].name;
})
div{
position:relative;
}
input{
display:none;
}
<div>
<input class="form-control" type="file" value="Seleccionar documento" id="upload">
<label for="upload"><button onclick="this.parentElement.previousElementSibling.click()">Choose File</button> <span>Select document</span></label>
</div>