you can show the file selection dialog with a onclick function, and if a file is choosen (onchange event) then send the form to upload the file
<form id='foto' method='post' action='upload' method="POST" enctype="multipart/form-data" >
<div style="height:0px;overflow:hidden">
<input type="file" id="fileInput" name="fileInput" onchange="this.form.submit()"/>
</div>
<i class='fa fa-camera' onclick="fileInput.click();"></i>
</form>