You've already forked joplin
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:
@@ -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,
|
||||
|
@@ -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}"`);
|
||||
}
|
||||
|
@@ -127,6 +127,7 @@ export interface StorageDriverConfig {
|
||||
path?: string;
|
||||
mode?: StorageDriverMode;
|
||||
region?: string;
|
||||
endpoint?: string;
|
||||
accessKeyId?: string;
|
||||
secretAccessKeyId?: string;
|
||||
bucket?: string;
|
||||
|
Reference in New Issue
Block a user