This is not how things work. Upload is something which needs both client-side and server-side. You did not mention any server-side technology, but most of your work is to develop the code for server-side.
There is almost nothing you can do to improve performance, especially on client side. Well, if you do something redundant, it can compromise performance, but I have no idea what have you done so far. Basically, on client side, you can create a form with the HTTP method "POST". It will post all the data including file to the server. Alternatively, you can use Ajax. On server side, you need to get uploaded data and process it. The implementation strongly depends on server-side technology you use.
This is a pretty good jQuery demo: http://blueimp.github.com/jQuery-File-Upload/
You can use your browser to "View source code", identify URLs or all script and download them to see how they work.
You can find a lot more: http://bit.ly/z39dd0