Yes, it is very simple. You can listen onchange file input event and hide it.
HTML:
<input name="inpt" type="file"/> <input type="button" value="Upload"/>
JavaScript:
//this event is fired when the file is chosen (not when user presses the cancel button) inpt.onchange = function(e) { //setting display to "none" hides an element inpt.style.display="none"; };
Jsfiddle
PS. if you want, you can use the same trick to show the "Download" button only when selecting a file. In this case, the button code will be <input id="btn" type="button" value="Upload" style="display:none"/> , and in the Javascript code you write btn.style.display="" to show button.
source share