class AWS::S3::ObjectUploadCollection
object.multipart_uploads[id]
@example Get an upload by ID
object.multipart_uploads.each(&:abort)
@example Cancel all uploads for an object
Represents uploads in progress for a single object.
def [] id
-
id
(String
) -- The ID of an upload to get.
Returns:
-
(MultipartUpload)
- An object representing the upload
def [] id MultipartUpload.new(object, id) end
def create(options = {})
Creates a new multipart upload. It is usually more
def create(options = {}) options[:storage_class] = :reduced_redundancy if options.delete(:reduced_redundancy) initiate_opts = { :bucket_name => object.bucket.name, :key => object.key }.merge(options) id = client.initiate_multipart_upload(initiate_opts).upload_id MultipartUpload.new(object, id) end
def each(options = {}, &block)
-
(nil)
-
Other tags:
- Yieldparam: upload - An upload in the
def each(options = {}, &block) @all_uploads.each(options) do |upload| yield(upload) if upload.object.key == @object.key end nil end
def initialize(object, opts = {})
- Private: -
def initialize(object, opts = {}) @all_uploads = MultipartUploadCollection.new(object.bucket). with_prefix(object.key) @object = object super end