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
1 changed files with 2 additions and 2 deletions

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