diff --git a/ReactNativeClient/lib/SyncTargetAmazonS3.js b/ReactNativeClient/lib/SyncTargetAmazonS3.js index 5a71339cca4..a21b81b7cc2 100644 --- a/ReactNativeClient/lib/SyncTargetAmazonS3.js +++ b/ReactNativeClient/lib/SyncTargetAmazonS3.js @@ -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); diff --git a/ReactNativeClient/lib/models/Setting.ts b/ReactNativeClient/lib/models/Setting.ts index f54ee72736b..774cf9891bc 100644 --- a/ReactNativeClient/lib/models/Setting.ts +++ b/ReactNativeClient/lib/models/Setting.ts @@ -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,