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

@@ -941,8 +941,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
if ($scope.importBackup.region) backupConfig.region = $scope.importBackup.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.importBackup.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';