Class: Service::DigitalOceanService
- Inherits:
-
S3Service
- Object
- S3Service
- Service::DigitalOceanService
- Defined in:
- lib/active_storage/service/digital_ocean_service.rb
Overview
Wraps the DigitalOcean Spaces as an Active Storage service. See ActiveStorage::Service for the generic API documentation that applies to all services.
Instance Method Summary collapse
-
#initialize(space_name:, upload: {}, **options) ⇒ DigitalOceanService
constructor
A new instance of DigitalOceanService.
Constructor Details
#initialize(space_name:, upload: {}, **options) ⇒ DigitalOceanService
Returns a new instance of DigitalOceanService.
9 10 11 12 13 14 15 16 |
# File 'lib/active_storage/service/digital_ocean_service.rb', line 9 def initialize(space_name:, upload: {}, **) [:access_key_id] = .delete(:spaces_access_key) [:secret_access_key] = .delete(:spaces_secret_key) raise ActiveStorage::UnavailableConfigurationError if upload[:server_side_encryption] super(bucket: space_name, upload: upload, **) end |