Note: This answer is outdated, it is now possible to upload files using XHR.
You cannot upload files using XMLHttpRequest (Ajax). You can simulate the effect using an iframe or Flash. Try the SWF (Flash) uploader SWFUpload.
Or theThe excellent jQuery Form Plugin that posts your files through an iframe to get the effect.