How can I detect when a user has chosen which file to upload using a html file input. That way I can submit the form automatically.
The file upload element fires an onchange event when its contents have changed. Here's a very terse example:
<input type="file" name="whatever" onchange="alert('Changed!');" />
EDIT: Oh, and if you'd like to submit the form when they select something (although this will probably be a little confusing to your users):
<input type="file" name="whatever" onchange="this.form.submit();" />