1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Allow configuring the Azure Storage service with extra client options

This commit is contained in:
garytaylor 2019-02-04 14:08:55 +00:00 committed by George Claghorn
parent 7d85d3847e
commit 457dfc0621

View file

@ -10,8 +10,8 @@ module ActiveStorage
class Service::AzureStorageService < Service
attr_reader :client, :blobs, :container, :signer
def initialize(storage_account_name:, storage_access_key:, container:)
@client = Azure::Storage::Client.create(storage_account_name: storage_account_name, storage_access_key: storage_access_key)
def initialize(storage_account_name:, storage_access_key:, container:, **options)
@client = Azure::Storage::Client.create(storage_account_name: storage_account_name, storage_access_key: storage_access_key, **options)
@signer = Azure::Storage::Core::Auth::SharedAccessSignature.new(storage_account_name, storage_access_key)
@blobs = client.blob_client
@container = container