lib/brillo/transferrer/s3.rb in brillo-1.1.2 vs lib/brillo/transferrer/s3.rb in brillo-1.1.3

- old
+ new

@@ -22,21 +22,21 @@ ) end def download return unless enabled - logger.info("download from s3 #{bucket} #{path}") + logger.info("download #{path} from s3 #{bucket} #{filename}") FileUtils.rm path, force: true - client.get_object({bucket: bucket, key: path.to_s}, target: path) + client.get_object({bucket: bucket, key: filename}, target: path) rescue Aws::S3::Errors::NoSuchBucket create_bucket retry end def upload return unless enabled - logger.info("uploading to s3 #{bucket} #{path}") - object = resource.bucket(bucket).object(path.to_s) + logger.info("uploading #{path} to s3 #{bucket} #{filename}") + object = resource.bucket(bucket).object(filename) object.upload_file(path) rescue Aws::S3::Errors::NoSuchBucket create_bucket retry end