Also, You can write all inline, direct at html code:
<input type="file" id="imgupload">
<a href="#" onclick="$('#imgupload').trigger('click'); return false;">Upload file</a>
return false; - will be useful to decline anchor action after link was clicked.