The example below supports uploading multiple files in a single request, but the same technique.
Compatibility and Usage
Uploading Files to the Server with AJAX
All together now
Reading the file from the server
AJAX feedback events
Alternatives to AJAX File Uploads
Summary
Further Reading