upr.git  about / heads / tags
Upload Progress for Rack
$ git log --pretty=format:'%h %s (%cs)%d' v0.2.0 --
42d80bb upr 0.2.0 - twice as good as the first! (2009-11-13)
	(tag: v0.2.0)
2bec62c update README (2009-11-13)
9ad5760 examples/rails_app-2.3.4: show links to different interfaces (2009-11-13)
73ebdaf JSON: set no-transform in headers (2009-11-13)
474f31b tests: add Monitor tests (also reaches into Status) (2009-11-13)
eead1a8 example/rails_app-2.3.4: UprStatus unit tests (2009-11-13)
f4b4476 example/rails_app-2.3.4: limit compat 1.9 to only 1.9 (2009-11-12)
504ab0d Update README (2009-11-12)
b5419dc JSON compatible with Ry Dahl's Ajax.Pull + example (2009-11-12)
701405d Add jQuery-compatible Rails example (2009-11-12)
...

$ git cat-file blob v0.2.0:README
= upr - Upload Progress for Rack

upr is Rack middleware that allows browser-side upload progress
monitoring.  It is based on (and should be client-side compatible with)
several upload progress modules including ones used by leading web
servers.  It allows any Moneta backing store in addition to DRb.  There
is also a packaged example for using an ActiveRecord model for Rails.

== Demo

You can see upr in action at http://upr-demo.bogomips.org/  It will
report the size and SHA1 of the file you've uploaded.  Much of the demo
was stolen from all the existing upload progress examples for other web
servers.

== Web Server Compatibility

While upr is completely Rack::Lint-compatible, upr is only compatible
with Rack web servers that support a streaming "rack.input".  Currently
this is limited to {Rainbows!}[http://rainbows.rubyforge.org/] with a
handful of concurrency models:

* ThreadSpawn
* ThreadPool
* Revactor*

For use with Revactor, the use of network-based Moneta stores or DRb is
only advised if those stores are using Revactor-aware sockets.

== JavaScript/CSS/HTML Compatibility

The current developer does not react well with GUIs.  Thus all (R)HTML,
JavaScript and CSS example code was stolen from one of the following:

1. mongrel_upload_progress
   http://mongrel.rubyforge.org/wiki/UploadProgress
2. jquery-upload-progress
   http://github.com/drogus/jquery-upload-progress
3. mongrel_streaming_upload_progress
   http://rubyforge.org/pipermail/mongrel-users/2007-July/003747.html

This means our module should also be compatible with any of these
interfaces.

Contributions to enhance compatibility for more modern things like
jQuery and HTML5 are very welcome.  We would prefer as much as possible
to NOT proliferate new AJAX sub-protocols and use existing ones whenever
possible.  Our current favorite is the Ajax.Pull JavaScript used in
Ry Dahl's mongrel_streaming_upload_progress because it only requires a
one extra HTTP request to pull all the status notifications.

== Backend Compatibility

We depend on {Moneta}[http://github.com/wycats/moneta], which allows the
use of a multitude of key-value stores.  We also provide a
DRb+Moneta::Memory server to ease transitions from
mongrel_upload_progress.

Additionally, there is an example for using Rails ActiveRecord as a
backend storage mechanism.  Cookie-based upload tracking may eventually
be used, too (contributions very welcome).

== Proxy Compatibility

No proxy is required when used with Rainbows!

The only incompatible HTTP proxy we know of is nginx.  nginx will buffer
large requests to the filesystem before sending them to the backend.
nginx has its own 3rd-party module for
{upload progress}[http://wiki.nginx.org/NginxHttpUploadProgressModule]
and may be used instead of upr.

Most other HTTP-aware and all TCP-only proxies should be compatible.
Disabling Nagle's algorithm in both the Rack web server and proxy is
advised for lower latency, especially with stunnel.

== Unicorn Compatibility

While {Unicorn}[http://unicorn.bogomips.org/] provides the streaming
"rack.input" for Rainbows!, using Unicorn with upr is generally NOT
recommended.  Unicorn only supports fast clients and progress reporting
is unnecessary unless clients are uploading files that are hundreds of
megabyte in size or larger.

== Getting Started

  gem install upr

For Rails, look at the Rails application
{example}[http://git.bogomips.org/cgit/upr.git/tree/examples/rails_app-2.3.4]
and RDoc.  More documentation is on the way.

== Disclaimer

There is NO WARRANTY whatsoever if anything goes wrong, but let us know
and we'll try our best to fix it.

== License

upr is copyright 2009 by all contributors (see logs in git).  It is
based on mongrel_upload_progress and carries the same license (Ruby +
GPL2).  Bundled examples may different Free Software licenses, see the
included LICENSE file for details.

upr is 100% Free Software.  We will never support the proliferation of
non-Free browsers or plugins.

== Contact

All feedback (bug reports, user/development dicussion, patches, pull
requests) go to the mailing list/newsgroup.  Patches must be sent inline
(git format-patch -M + git send-email).  No top posting.

To subscribe or post to the mailing list, just send an email to
upr@librelist.com and follow the instructions in the automated reply.

* email: mailto:upr@librelist.com
* git: git://git.bogomips.org/upr.git or git://repo.or.cz/upr.git
* cgit: http://git.bogomips.org/cgit/upr.git

We will adhere to mostly the same conventions for patch submissions as
git itself.  See the Documentation/SubmittingPatches document
distributed with git on on patch submission guidelines to follow.  Just
don't email the git mailing list with upr patches :)

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       Rakefile: kill raa_update task (2013-09-30)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v0.3.0       upr 0.3.0 - update for Moneta ~> 0.7 (2013-07-09) tar.gz
v0.2.0       upr 0.2.0 - twice as good as the first! (2009-11-13) tar.gz
v0.1.0       upr 0.1.0 - initial release (2009-11-10) tar.gz

git clone https://yhbt.net/upr.git