class AWS::S3::UploadedPartCollection
upload.parts.inject(0) { |sum, part| sum + part.size }
@example Get the total size of the uploaded parts
class by calling {MultipartUpload#parts}.
a given multipart upload. You can get an instance of this
Represents the collection of parts that have been uploaded for
def [](number)
-
number
(Integer
) -- The part number.
Returns:
-
(UploadedPart)
- An object representing the part with
def [](number) UploadedPart.new(upload, number) end
def each_member_in_page(page, &block)
def each_member_in_page(page, &block) page.parts.each do |part_info| part = UploadedPart.new(upload, part_info.part_number, :etag => part_info.etag) yield(part) end end
def initialize(upload, opts = {})
- Api: - private
def initialize(upload, opts = {}) @upload = upload super end
def limit_param; :max_parts; end
def limit_param; :max_parts; end
def list_options(options)
def list_options(options) opts = super opts.merge!(:bucket_name => upload.object.bucket.name, :key => upload.object.key, :upload_id => upload.id) opts end
def list_request(options)
def list_request(options) client.list_parts(options) end
def pagination_markers
def pagination_markers [:part_number_marker] end