Class: SdrClient::Deposit::UploadFiles
- Inherits:
-
Object
- Object
- SdrClient::Deposit::UploadFiles
- Defined in:
- lib/sdr_client/deposit/upload_files.rb
Overview
The file uploading part of a deposit
Constant Summary collapse
- BLOB_PATH =
'/v1/direct_uploads'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_metadata:, logger:, connection:) ⇒ UploadFiles
constructor
A new instance of UploadFiles.
-
#run ⇒ Array<SdrClient::Deposit::Files::DirectUploadResponse>
The responses from the server for the uploads.
Constructor Details
#initialize(file_metadata:, logger:, connection:) ⇒ UploadFiles
Returns a new instance of UploadFiles.
20 21 22 23 24 |
# File 'lib/sdr_client/deposit/upload_files.rb', line 20 def initialize(file_metadata:, logger:, connection:) @file_metadata = @logger = logger @connection = connection end |
Class Method Details
.upload(file_metadata:, logger:, connection:) ⇒ Object
13 14 15 |
# File 'lib/sdr_client/deposit/upload_files.rb', line 13 def self.upload(file_metadata:, logger:, connection:) new(file_metadata: , logger: logger, connection: connection).run end |
Instance Method Details
#run ⇒ Array<SdrClient::Deposit::Files::DirectUploadResponse>
Returns the responses from the server for the uploads.
27 28 29 30 31 |
# File 'lib/sdr_client/deposit/upload_files.rb', line 27 def run upload_responses = upload_files(upload_responses) upload_responses.values end |