Shopify/asset_cloud — pull request #5 by karlhungus (2014-11-20 14:45:10+00:00)
Title: add streamable bucketio

##### Problem

Want to be able to stream to S3 buckets

##### Solution

Add bucket_io to allow multipart_upload to s3, the idea is i would replace: https://github.com/Shopify/shopify/commit/58a2b43340394251e003bab57b5fad8ab4c8dfa8#diff-2873e04fea7dc6a1c90e62e2d00f99d8R32

WIth something like

```ruby
class S3BucketIO
def <<(data)
#with something to hold on to the < 5 megs of data here
@streamable.add_part(data)
end

def close
@streamable.complete(:remote_parts)
end

def delete
@streamable.abort
end
end

class PublicS3Bucket
...
def bucket_io(key)
object = Shopify::Config.s3_bucket.objects[shop_key(key)]
S3Bucket.new(object.multipart_upload)
end
end
...
end
```