aws/aws-sdk-ios — pull request #16 by gbarnett-cs (2013-03-22 15:50:09+00:00)
Title: Support for S3 Multipart Uploads to be cancelled before they are finished

S3TransferManager handles multipart uploads as NSOperations via the S3MultipartUploadOperation_Internal.m class.

My implementation checks [self isCancelled] at two points:

* Between each upload in a multipart upload
* Before each retry in a retry scenario

This allows for long running multipart uploads to be cancelled before they are completed by calling [transferManager.operationQueue cancelAllOperations];

This is useful if the device transitions from a WiFi connection to a Cellular connection, and we want to avoid the data plan overage impact of a very large upload.

Related: [NSOperation Class Reference: "Responding to the Cancel Command"](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html#//apple_ref/doc/uid/TP40004591-RH2-SW18)