code et al
jordan at jordanhollinger dot com
powered by eridu

Showing recent posts tagged with ajax

Async, ajax uploads with HTML5

July 27, 2012 | ajax, html5, javascript

HTML5 is orange! Everyone loves Gmail's async-drag-and-drop-with-progress bar attachment UI. While I'd heard that HTML5 supports this type of upload, I found myself sticking with the nasty old form submission model.

While writing a media manager for eridu, I decided to finally look into it. My research into the progress element, the drop event, and the FileReader object bore a tiny ~180 line Sinatra app. Download it, run ruby dropbox.rb, and you have a complete reference implementation of a Gmail-like uploader.

Here, I'll walk though a more basic version...

read more →