Class: FileStore::Providers::S3
- Defined in:
- lib/file_store/providers/s3.rb
Constant Summary collapse
- REQUIRED_CONFIGS =
[:aws_access_key, :aws_access_secret, :aws_s3_bucket, :aws_region].freeze
- DEFAULT_S3_OPTIONS =
{ server_side_encryption: 'AES256'.freeze, acl: 'private'.freeze }.freeze
Instance Attribute Summary
Attributes inherited from Provider
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ S3
constructor
A new instance of S3.
Methods inherited from Provider
#download_url, #mock!, #mock_download_url, #mock_upload, #mocked?, #upload
Constructor Details
#initialize(opts = {}) ⇒ S3
Returns a new instance of S3.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/file_store/providers/s3.rb', line 13 def initialize(opts = {}) super @_synchronizer = Mutex.new @_s3_interface = ::Aws::S3::Resource.new( access_key_id: [:aws_access_key], secret_access_key: [:aws_access_secret], region: [:aws_region] ) @_s3_bucket = _s3_interface.bucket(_bucket_name) end |