[Mongrel] streaming upload progress plug-in

ry dahl ry at tinyclouds.org
Sat Jul 7 20:58:45 EDT 2007

I'm working on new methods of doing Ajax calls through streaming
responses. I've created a little javascript library (which depends on
prototype.js) that can interpret a stream of JSON objects separated by

As an application of this, this Mongrel plug-in streams upload status
when given a qualified  upload_id. It looks like this:

(The format of these JSON objects is the same that is being used in
the upload progress plug-in for Lighttpd 1.5 as described at
http://trac.lighttpd.net/trac/wiki/Docs:ModUploadProgress )

Included with this package is the javascript library Ajax.Pull, and an
example Rails application.


This should work with Safari 3 and Firefox. I haven't tested IE.
(When I get around to it will add a hack to Ajax.Pull which falls back
on polling a URL for the JSON updates if the browser does not support
Ajax streaming. This plug-in already supports this sort of polling
with the ?single=true URL parameter.)


More information about the Mongrel-users mailing list