mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Add region param for MinIO bucket (#428)
add region parameter for MinIO buckets
This commit is contained in:
parent
80c56f7d4f
commit
bb9dd5f15e
@ -35,6 +35,7 @@ export class MinIOExternalStorage implements ExternalStorage {
|
||||
useSSL?: boolean,
|
||||
accessKey: string,
|
||||
secretKey: string,
|
||||
region: string
|
||||
}, private _batchSize?: number) {
|
||||
this._s3 = new minio.Client(options) as MinIOClient;
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ export function checkMinIOExternalStorage() {
|
||||
preferredEnvVar: 'GRIST_DOCS_MINIO_BUCKET',
|
||||
});
|
||||
if (!bucket) { return undefined; }
|
||||
const region = settings.flag('bucketRegion').requireString({
|
||||
envVar: ['GRIST_DOCS_MINIO_BUCKET_REGION'],
|
||||
preferredEnvVar: 'GRIST_DOCS_MINIO_BUCKET_REGION',
|
||||
defaultValue: 'us-east-1'
|
||||
});
|
||||
const prefix = settings.flag('prefix').requireString({
|
||||
envVar: ['GRIST_DOCS_MINIO_PREFIX'],
|
||||
preferredEnvVar: 'GRIST_DOCS_MINIO_PREFIX',
|
||||
@ -52,5 +57,6 @@ export function checkMinIOExternalStorage() {
|
||||
useSSL,
|
||||
accessKey,
|
||||
secretKey,
|
||||
region
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user