Represents the collection of parts that have been uploaded for a given multipart upload. You can get an instance of this class by calling {AWS::S3::MultipartUpload#parts}.
@example Get the total size of the uploaded parts
upload.parts.inject(0) { |sum, part| sum + part.size }
@return [MultipartUpload] The upload to which the parts belong.
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 33 def initialize(upload, opts = {}) @upload = upload super end
@return [UploadedPart] An object representing the part with
the given part number.
@param [Integer] number The part number.
# File lib/aws/s3/uploaded_part_collection.rb, line 42 def [](number) UploadedPart.new(upload, number) end
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 48 def each_member_in_page(page, &block) page.parts.each do |part_info| part = UploadedPart.new(upload, part_info.part_number) yield(part) end end
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 67 def limit_param; :max_parts; end
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 57 def list_options(options) opts = super opts.merge!(:bucket_name => upload.object.bucket.name, :key => upload.object.key, :upload_id => upload.id) opts end
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 71 def list_request(options) client.list_parts(options) end
@private
# File lib/aws/s3/uploaded_part_collection.rb, line 77 def pagination_markers [:part_number_marker] end