lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb
def resume(upload_id)
            raise 'An upload ID must be provided' if upload_id.nil?
            raise 'Parts must be initialized prior to resuming' if @manifest[:parts].length.zero?

            manifest[:upload_id] = upload_id
            upload_parts = list_uploaded_parts(upload_id)
            known_parts = @manifest[:parts].to_a

            raise 'There are more parts on the server than parts to resume, please check the upload ID.' \
              if upload_parts.length > known_parts.length

            upload_parts.each do |up|
              index = up.part_number - 1
              manifest_part = known_parts[index]

              if manifest_part[:part_size] != up.size
                raise 'Cannot resume upload with different part size. ' \
                  + "Parts were uploaded with a part size of #{up.size / OCI::ObjectStorage::Transfer::MEBIBYTE} MiB"
              end

              manifest_part[:etag] = up.etag
              manifest_part[:opc_md5] = up.md5
            end

            upload
          end
# Resume uploading a multipart object to Object Storage. This assumes that the assembler already has knowledge
# of the parts which it could potentially need to upload (i.e. they have been prepared via the set_io_for_transfer
# method).
#
# Prior to resuming the upload, we'll attempt to reconcile with Object Storage any previously uploaded parts so that
# they are not uploaded again
#
# @param [String] upload_id The ID of the multipart upload to resume.
#
# @return [Array] If the multipart upload was successful, an empty array. If there were errors then the array will contain
# one element per error which occurred.
Resume uploading a multipart object to Object Storage. This assumes that the assembler already has knowledge
of the parts which it could potentially need to upload .

Prior to resuming the upload, we'll attempt to reconcile with Object Storage any previously uploaded parts so that
they are not uploaded again
Resume uploading a multipart object to Object Storage . This assumes that the assembler already has knowledge of the parts which it could potentially need to upload . Prior to resuming the upload we ' ll attempt to reconcile with Object Storage any previously uploaded parts so that they are not uploaded again
def resume(upload_id)
            raise 'An upload ID must be provided' if upload_id.nil?
            raise 'Parts must be initialized prior to resuming' if @manifest[:parts].length.zero?
            manifest[:upload_id] = upload_id
            upload_parts = list_uploaded_parts(upload_id)
            known_parts = @manifest[:parts].to_a
            raise 'There are more parts on the server than parts to resume, please check the upload ID.' \
              if upload_parts.length > known_parts.length
            upload_parts.each do |up|
              index = up.part_number - 1
              manifest_part = known_parts[index]
              if manifest_part[:part_size] != up.size
                raise 'Cannot resume upload with different part size. ' \
                  + "Parts were uploaded with a part size of #{up.size / OCI::ObjectStorage::Transfer::MEBIBYTE} MiB"
              end
              manifest_part[:etag] = up.etag
              manifest_part[:opc_md5] = up.md5
            end
            upload
          end
def resume ( upload_id ) raise 'An upload ID must be provided' if upload_id . nil? raise 'Parts must be initialized prior to resuming' if @manifest [ :parts ] . length . zero? manifest [ :upload_id ] = upload_id upload_parts = list_uploaded_parts ( upload_id ) known_parts = @manifest [ :parts ] . to_a raise 'There are more parts on the server than parts to resume, please check the upload ID.' if upload_parts . length > known_parts . length upload_parts . each do | up | index = up . part_number - 1 manifest_part = known_parts [ index ] if manifest_part [ :part_size ] != up . size raise 'Cannot resume upload with different part size. ' + "Parts were uploaded with a part size of #{up.size / OCI::ObjectStorage::Transfer::MEBIBYTE} MiB" end manifest_part [ :etag ] = up . etag manifest_part [ :opc_md5 ] = up . md5 end upload end
Resume uploading a multipart object to Object Storage.
Resume uploading a multipart object to Object Storage .
If the multipart upload was successful, an empty array. If there were errors then the array will contain one element per error which occurred.
If the multipart upload was successful an empty array . If there were errors then the array will contain one element per error which occurred .
Array
upload_id
upload_id The ID of the multipart upload to resume.
upload_id The ID of the multipart upload to resume .