From e4b0baa3e77c423379fc6fc4939439ba7b100c17 Mon Sep 17 00:00:00 2001 From: Ben Tregenna Date: Tue, 13 Aug 2019 13:15:43 +0100 Subject: [PATCH] Added line to create S3 client in search upload --- lib/modules/s3.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/modules/s3.rb b/lib/modules/s3.rb index a4e1e131f..07a1c5fe8 100644 --- a/lib/modules/s3.rb +++ b/lib/modules/s3.rb @@ -7,7 +7,8 @@ def initialize access_key_id: Rails.application.secrets.aws_access_key_id, secret_access_key: Rails.application.secrets.aws_secret_access_key, region: Rails.application.secrets.s3_region - }) + }) + @client = Aws::S3::Client.new(region: Rails.application.secrets.s3_region) end def self.upload object_name, file_path, opts={}