class ActiveStorage::Service::AzureStorageService
def download(key, &block)
def download(key, &block) if block_given? instrument :streaming_download, key: key do stream(key, &block) end else instrument :download, key: key do handle_errors do _, io = client.get_blob(container, key) io.force_encoding(Encoding::BINARY) end end end end