Errr, I believe the repo domain generates its own form. Could be wrong.
This, or something like it, generates metadata in the multipart/form-data which describes the file. That metadata is used to determine the disposition of the file by the upload command.
<form method='post' action='.' enctype='multipart/form-data' id='upload'><label><button name='submit' type='submit' tabindex='1'>Upload</button></label> <input class='multi' name='file' type='file' tabindex='2'><input name='op' type='hidden' value='upload' tabindex='3'></form>
If you're keen to just add an upload form to a page, consider using the same techniques. Bit complex, I know, as it has to drag stuff out of the multipart/form-data data structure. Gives you heaps of good information about the file though.
Colin