submit a file without a submit button w3schols code example
Example: upload button in html
<form action="/action_page.php">
<input type="file" id="myFile"
name="filename">
<input type="submit">
</form>
<form action="/action_page.php">
<input type="file" id="myFile"
name="filename">
<input type="submit">
</form>