Skip to content
An example of HTML5-powered Ajax file uploads
Branch: master
Clone or download
This branch is even with New-Bamboo:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Example of Ajax-powered file uploads

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.

What to look at?

The important bit is the client code, found at /public/index.html

This code is thoroughly commented, and there's additional information at our original article covering Ajax file uploads

Not really HTML5

Although initially I (Pablo Brasero) referred to this technique as HTML5 uploads, this is not actually correct. The interfaces used are described in two separate specifications, different from HTML5. These are XMLHttpRequest level 2 and the File API.

Also, remember that these specifications are, at the time of writing, working drafts. They could change in the future, before they become full-fledged W3C recommended standards.

You can’t perform that action at this time.