andrewgleave/CouchDBAttachmentUploader — pull request #6 by jpfiset (2012-04-20 16:42:45+00:00)
Title: Progress callback

This request relates to changes that add an upload progress callback to CouchDbAttachmentUploader. This is inspired from the work previously done by Max Ogden.

In the upload call, the client may specify a progress callback in the options object. In the javascript plugin code, the relevant options are passed on to the request. In the case of "progress", the function is captured and installed as a valid callback.

In the Objective-C class, the progress callback is invoked every time the URL request sends information about the progress.

With this approach, the javascript API remains compatible with previous versions.