A simple application written in Ruby, using the Sinatra framework. Hopefully it should be easy to read even to those who don't know Ruby.
To run it, do:
rackup -I.
And the application should be accessible at http://localhost:9292
.
The important bit is the client code, found at /public/index.html
If you want to know more, have a look at our blog post covering HTML5 file uploads