Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
Get Image: <input type="file" id="myFile">
<br>
<button onclick="disableBtn()">Disable File Upload</button>
<button onclick="undisableBtn()">Undisable File Upload</button>
<script>
function disableBtn() {
  document.getElementById("myFile").disabled = true;
}
function undisableBtn() {
  document.getElementById("myFile").disabled = false;
}
</script>
</body>
</html>