class AWS::S3::UploadedPart
upload.parts.inject(0) { |sum, part| sum + part.size }
@example Get the total size of the uploaded parts
to S3.
Represents a part of a multipart upload that has been uploaded
def ==(other)
def ==(other) other.kind_of?(UploadedPart) and other.upload == upload and other.part_number == part_number end
def etag
-
(String)
- The ETag of the part.
def etag get_attribute(:etag) end
def get_attribute(name)
def get_attribute(name) (resp = client.list_parts(:bucket_name => upload.object.bucket.name, :key => upload.object.key, :upload_id => upload.id, :part_number_marker => part_number-1, :max_parts => 1) and part = resp.parts.first and part.part_number == part_number and part.send(name)) or raise "part 3 of upload abc123 does not exist" end
def initialize(upload, part_number, opts = {})
- Private: -
def initialize(upload, part_number, opts = {}) @upload = upload @part_number = part_number super end
def last_modified
-
(DateTime)
- The time at which the part was last
def last_modified get_attribute(:last_modified) end
def size
-
(Integer)
- The size of the part as it currently
def size get_attribute(:size) end