From 3c7b8da9a88df75bbb4f6e63830d63148e543bc6 Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Thu, 14 Oct 2021 23:15:03 +0100 Subject: fix: don't set location by default --- cdn/src/util/Storage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cdn/src/util/Storage.ts') diff --git a/cdn/src/util/Storage.ts b/cdn/src/util/Storage.ts index acef9df3..3332f21c 100644 --- a/cdn/src/util/Storage.ts +++ b/cdn/src/util/Storage.ts @@ -45,13 +45,13 @@ if (process.env.STORAGE_PROVIDER === "file" || !process.env.STORAGE_PROVIDER) { let location = process.env.STORAGE_LOCATION; if (!location) { - console.warn(`[CDN] STORAGE_LOCATION unconfigured for S3 provider, defaulting to '/'...`); - location = "/"; + console.warn(`[CDN] STORAGE_LOCATION unconfigured for S3 provider, defaulting to the bucket root...`); + location = undefined; } const client = new S3({ region }); - storage = new S3Storage(client, location, bucket); + storage = new S3Storage(client, bucket, location); } export { storage }; -- cgit 1.5.1