s3: add region field to import and restore UI

for s3 v4 compat providers like yandex

fixes cloudron/box#713
This commit is contained in:
Girish Ramakrishnan
2020-07-05 10:58:20 -07:00
parent 200122deee
commit a9a9af9ef7
4 changed files with 14 additions and 2 deletions

View File

@@ -171,8 +171,9 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
if ($scope.region) backupConfig.region = $scope.region;
delete backupConfig.endpoint;
} else if (backupConfig.provider === 'minio' || backupConfig.provider === 's3-v4-compat') {
backupConfig.region = 'us-east-1';
backupConfig.region = backupConfig.region || 'us-east-1';
backupConfig.acceptSelfSignedCerts = $scope.acceptSelfSignedCerts;
backupConfig.s3ForcePathStyle = true; // might want to expose this in the UI
} else if (backupConfig.provider === 'exoscale-sos') {
backupConfig.region = 'us-east-1';
backupConfig.signatureVersion = 'v4';