Class: AWS::S3::MultipartUploadCollection

Inherits:
Object
  • Object
show all
Includes:
Core::Model, PrefixAndDelimiterCollection, Enumerable
Defined in:
lib/aws/s3/multipart_upload_collection.rb

Overview

Represents the uploads in progress for a bucket.

Examples:

Finding uploads by prefix

bucket.multipart_uploads.with_prefix("photos/").
  map { |upload| upload.object.key }
# => ["photos/1.jpg", "photos/2.jpg", ...]

Browsing with a tree interface

bucket.multipart_uploads.with_prefix("photos").as_tree.
  children.select(&:branch?).map(&:prefix)
# => ["photos/2010", "photos/2011", ...]

See Also:

Instance Attribute Summary collapse

Attributes included from PrefixedCollection

#prefix

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods included from PrefixAndDelimiterCollection

#as_tree

Methods included from PrefixedCollection

#with_prefix

Methods included from Core::Collection::Limitable

#each_batch

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Methods included from Core::Model

#client, #config_prefix, #inspect

Constructor Details

#initialize(bucket, opts = {}) ⇒ MultipartUploadCollection

Returns a new instance of MultipartUploadCollection.



41
42
43
44
# File 'lib/aws/s3/multipart_upload_collection.rb', line 41

def initialize(bucket, opts = {})
  @bucket = bucket
  super
end

Instance Attribute Details

#bucketBucket (readonly)

Returns The bucket in which the uploads are taking place.

Returns:

  • (Bucket)

    The bucket in which the uploads are taking place.



38
39
40
# File 'lib/aws/s3/multipart_upload_collection.rb', line 38

def bucket
  @bucket
end