lib/oci/object_storage/transfer/upload_manager.rb
# Resumes a multipart upload. Note that the multipart upload part size which has been configured for this UploadManager needs to match
# the part size of any parts which have previously been uploaded for the given multipart upload.
#
# @param [String] upload_id The ID of the multipart upload to resume.
# @param [String] namespace_name The namespace containing the bucket in which to store the object
# @param [String] bucket_name The bucket where we'll upload the object
# @param [String] object_name The name of the object in Object Storage
# @param [String, IO] object_io_or_file_path Either a path to the file to upload, an IO-like object containing the data to upload or $stdin.
#
# @param [Hash] opts the optional parameters
# @option opts [String] :opc_client_request_id The client request ID for tracing.
#
# @return [Response] A Response object with data of type nil. For a multipart upload, the headers of the response will contain
# an opc-multipart-md5 key. For scenarios where the object was uploaded in a single part, the opc-content-md5 key will be
# present in the headers of the Response.
#
# @raise [OCI::Errors::MultipartUploadError] if an error occurred when performing a multipart upload. Consult the errors collection inside
# the exception to check the underlying errors which caused the failure
Resumes a multipart upload. Note that the multipart upload part size which has been configured for this UploadManager needs to match
the part size of any parts which have previously been uploaded for the given multipart upload.
Resumes a multipart upload . Note that the multipart upload part size which has been configured for this UploadManager needs to match the part size of any parts which have previously been uploaded for the given multipart upload .
def resume(upload_id, namespace_name, bucket_name, object_name, object_io_or_file_path, opts = {})
          raise 'An upload_id must be provided' if upload_id.nil?
          raise 'A namespace_name must be provided' if namespace_name.nil?
          raise 'A bucket_name must be provided' if bucket_name.nil?
          raise 'An object_name must be provided' if object_name.nil?
          raise 'An object_io_or_file_path must be provided' if object_io_or_file_path.nil?
          assembler = OCI::ObjectStorage::Transfer::Multipart::MultipartObjectAssembler.new(
            object_storage_client: @object_storage_client,
            namespace: namespace_name,
            bucket_name: bucket_name,
            object_name: object_name,
            multipart_part_size: @upload_manager_config.multipart_part_size,
            non_file_io_multipart_part_size: @upload_manager_config.non_file_io_multipart_part_size,
            parallel_process_count: multipart_parallel_process_count,
            multipart_upload_opts: opts
          )
          assembler.io_for_transfer = object_io_or_file_path
          errors = assembler.resume(upload_id)
          raise OCI::Errors::MultipartUploadError('Errors occurred while resuming the multipart upload', errors, upload_id) \
            unless errors.empty?
          assembler.commit
        end
def resume ( upload_id , namespace_name , bucket_name , object_name , object_io_or_file_path , opts = { } ) raise 'An upload_id must be provided' if upload_id . nil? raise 'A namespace_name must be provided' if namespace_name . nil? raise 'A bucket_name must be provided' if bucket_name . nil? raise 'An object_name must be provided' if object_name . nil? raise 'An object_io_or_file_path must be provided' if object_io_or_file_path . nil? assembler = OCI :: ObjectStorage :: Transfer :: Multipart :: MultipartObjectAssembler . new ( object_storage_client : @object_storage_client , namespace : namespace_name , bucket_name : bucket_name , object_name : object_name , multipart_part_size : @upload_manager_config . multipart_part_size , non_file_io_multipart_part_size : @upload_manager_config . non_file_io_multipart_part_size , parallel_process_count : multipart_parallel_process_count , multipart_upload_opts : opts ) assembler . io_for_transfer = object_io_or_file_path errors = assembler . resume ( upload_id ) raise OCI :: Errors :: MultipartUploadError ( 'Errors occurred while resuming the multipart upload' , errors , upload_id ) unless errors . empty? assembler . commit end
Resumes a multipart upload.
Resumes a multipart upload .
A Response object with data of type nil. For a multipart upload, the headers of the response will contain an opc-multipart-md5 key. For scenarios where the object was uploaded in a single part, the opc-content-md5 key will be present in the headers of the Response.
A Response object with data of type nil . For a multipart upload the headers of the response will contain an opc - multipart - md5 key . For scenarios where the object was uploaded in a single part the opc - content - md5 key will be present in the headers of the Response .
Response
[OCI::Errors::MultipartUploadError] if an error occurred when performing a multipart upload. Consult the errors collection inside the exception to check the underlying errors which caused the failure
[ OCI :: Errors :: MultipartUploadError ] if an error occurred when performing a multipart upload . Consult the errors collection inside the exception to check the underlying errors which caused the failure
upload_id
namespace_name
bucket_name
object_name
object_io_or_file_path
opts
:opc_client_request_id The client request ID for tracing.
: opc_client_request_id The client request ID for tracing .
opts the optional parameters
opts the optional parameters