The secret to ajax file uploading is called target.
The trick then is that you can block the reloading of the current page on form submit by setting the target property of the form tag (which acts the same as it would on an anchor tag). The target then becomes a static or dynamic hidden iframe with src=about:blank. You add an onload event to the iframe so you can inform the user the file is done uploading.
This way you can upload files in your page without reloading the entire webpage :)