mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-14 18:27:44 +02:00
parent
0f9d92dd3d
commit
a93bda71fe
@ -41,6 +41,8 @@ class SyncTargetAmazonS3 extends BaseSyncTarget {
|
||||
accessKeyId: Setting.value('sync.8.username'),
|
||||
secretAccessKey: Setting.value('sync.8.password'),
|
||||
s3UseArnRegion: true, // override the request region with the region inferred from requested resource's ARN
|
||||
s3ForcePathStyle: true,
|
||||
endpoint: Setting.value('sync.8.url'),
|
||||
};
|
||||
}
|
||||
|
||||
@ -56,6 +58,8 @@ class SyncTargetAmazonS3 extends BaseSyncTarget {
|
||||
accessKeyId: options.username(),
|
||||
secretAccessKey: options.password(),
|
||||
s3UseArnRegion: true,
|
||||
s3ForcePathStyle: true,
|
||||
endpoint: options.url(),
|
||||
};
|
||||
|
||||
const api = new S3(apiOptions);
|
||||
|
@ -274,6 +274,17 @@ class Setting extends BaseModel {
|
||||
label: () => _('AWS S3 bucket'),
|
||||
description: () => emptyDirWarning,
|
||||
},
|
||||
'sync.8.url': {
|
||||
value: 'https://s3.amazonaws.com/',
|
||||
type: SettingItemType.String,
|
||||
section: 'sync',
|
||||
show: (settings:any) => {
|
||||
return settings['sync.target'] == SyncTargetRegistry.nameToId('amazon_s3');
|
||||
},
|
||||
public: true,
|
||||
label: () => _('AWS S3 URL'),
|
||||
secure: false,
|
||||
},
|
||||
'sync.8.username': {
|
||||
value: '',
|
||||
type: SettingItemType.String,
|
||||
|
Loading…
Reference in New Issue
Block a user