1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Server: Added endpoint configuration for StorageDriverS3 (#12032)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
coldWater
2025-04-25 03:07:04 +08:00
committed by GitHub
parent 6265be924a
commit e08fd0ea53
3 changed files with 4 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ export default class StorageDriverS3 extends StorageDriverBase {
this.client_ = new S3Client({
// We need to set a region. See https://github.com/aws/aws-sdk-js-v3/issues/1845#issuecomment-754832210
region: this.config.region,
endpoint: this.config.endpoint,
credentials: {
accessKeyId: this.config.accessKeyId,
secretAccessKey: this.config.secretAccessKeyId,

View File

@@ -51,6 +51,8 @@ export default function(connectionString: string): StorageDriverConfig | null {
output.secretAccessKeyId = value;
} else if (key === 'Bucket') {
output.bucket = value;
} else if (key === 'Endpoint') {
output.endpoint = value;
} else {
throw new Error(`Invalid key: "${key}"`);
}

View File

@@ -127,6 +127,7 @@ export interface StorageDriverConfig {
path?: string;
mode?: StorageDriverMode;
region?: string;
endpoint?: string;
accessKeyId?: string;
secretAccessKeyId?: string;
bucket?: string;