From d2bce6e091280e3aef1e1063284e75b394efdc89 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Tue, 23 Feb 2021 16:13:33 +0100 Subject: [PATCH] MediaConfig: Change s3 config remove region as this is specified by endPoint now add bucket in schema and actual assignment Signed-off-by: Philip Molares --- src/config/media.config.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/config/media.config.ts b/src/config/media.config.ts index 39b29f306..52065c782 100644 --- a/src/config/media.config.ts +++ b/src/config/media.config.ts @@ -18,7 +18,6 @@ export interface MediaConfig { s3: { accessKeyId: string; secretAccessKey: string; - region: string; bucket: string; endPoint: string; }; @@ -49,9 +48,8 @@ const mediaSchema = Joi.object({ then: Joi.object({ accessKey: Joi.string().label('HD_MEDIA_BACKEND_S3_ACCESS_KEY'), secretKey: Joi.string().label('HD_MEDIA_BACKEND_S3_SECRET_KEY'), + bucket: Joi.string().label('HD_MEDIA_BACKEND_S3_BUCKET'), endPoint: Joi.string().label('HD_MEDIA_BACKEND_S3_ENDPOINT'), - secure: Joi.boolean().label('HD_MEDIA_BACKEND_S3_SECURE'), - port: Joi.number().label('HD_MEDIA_BACKEND_S3_PORT'), }), otherwise: Joi.optional(), }), @@ -86,9 +84,8 @@ export default registerAs('mediaConfig', () => { s3: { accessKey: process.env.HD_MEDIA_BACKEND_S3_ACCESS_KEY, secretKey: process.env.HD_MEDIA_BACKEND_S3_SECRET_KEY, + bucket: process.env.HD_MEDIA_BACKEND_S3_BUCKET, endPoint: process.env.HD_MEDIA_BACKEND_S3_ENDPOINT, - secure: process.env.HD_MEDIA_BACKEND_S3_SECURE, - port: parseInt(process.env.HD_MEDIA_BACKEND_S3_PORT) || undefined, }, azure: { connectionString: