Method: Tus::Storage::S3#initialize
- Defined in:
- lib/tus/storage/s3.rb
#initialize(bucket:, prefix: nil, upload_options: {}, thread_count: 10, **client_options) ⇒ S3
Initializes an aws-sdk-s3 client with the given credentials.
22 23 24 25 26 27 28 29 30 |
# File 'lib/tus/storage/s3.rb', line 22 def initialize(bucket:, prefix: nil, upload_options: {}, thread_count: 10, **) resource = Aws::S3::Resource.new(**) @client = resource.client @bucket = resource.bucket(bucket) or fail(ArgumentError, "the :bucket option was nil") @prefix = prefix = @thread_count = thread_count end |