From 329bc6bf42ee15e26d5a89216fba3aafbae01724 Mon Sep 17 00:00:00 2001 From: David Bonnet Date: Mon, 11 Mar 2019 09:25:18 +0100 Subject: [PATCH] Permit custom region initialization --- Sources/Storage/Utilities/S3.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Storage/Utilities/S3.swift b/Sources/Storage/Utilities/S3.swift index 4cbe78b..5474e49 100644 --- a/Sources/Storage/Utilities/S3.swift +++ b/Sources/Storage/Utilities/S3.swift @@ -21,6 +21,10 @@ public struct Region { public static var apNortheast2: Region = .init(code: "ap-northeast-2") public static var saEast1: Region = .init(code: "sa-east-1") + public init(code: String) { + self.code = code + } + public var host: String { return "s3-\(code).amazonaws.com" }