mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
@@ -9,4 +9,5 @@ export const s3Client = new S3Client({
|
||||
accessKeyId: config.storage.accessKey,
|
||||
secretAccessKey: config.storage.secretKey,
|
||||
},
|
||||
forcePathStyle: config.storage.forcePathStyle,
|
||||
});
|
||||
|
||||
@@ -7,6 +7,7 @@ export const storageConfigSchema = z.object({
|
||||
secretKey: z.string({ error: 'STORAGE_S3_SECRET_KEY is required' }),
|
||||
bucket: z.string({ error: 'STORAGE_S3_BUCKET is required' }),
|
||||
region: z.string({ error: 'STORAGE_S3_REGION is required' }),
|
||||
forcePathStyle: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export type StorageConfig = z.infer<typeof storageConfigSchema>;
|
||||
@@ -19,5 +20,6 @@ export const readStorageConfigVariables = () => {
|
||||
secretKey: process.env.STORAGE_S3_SECRET_KEY,
|
||||
bucket: process.env.STORAGE_S3_BUCKET,
|
||||
region: process.env.STORAGE_S3_REGION,
|
||||
forcePathStyle: process.env.STORAGE_S3_FORCE_PATH_STYLE === 'true',
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user