fix(S3): remove S3ClientOptions
This commit is contained in:
parent
56c60703a6
commit
4acc7f737e
@ -7,7 +7,6 @@ import com.amazonaws.regions.Region;
|
|||||||
import com.amazonaws.regions.Regions;
|
import com.amazonaws.regions.Regions;
|
||||||
import com.amazonaws.services.s3.AmazonS3;
|
import com.amazonaws.services.s3.AmazonS3;
|
||||||
import com.amazonaws.services.s3.AmazonS3Client;
|
import com.amazonaws.services.s3.AmazonS3Client;
|
||||||
import com.amazonaws.services.s3.S3ClientOptions;
|
|
||||||
|
|
||||||
import org.cryptomator.domain.S3Cloud;
|
import org.cryptomator.domain.S3Cloud;
|
||||||
import org.cryptomator.util.crypto.CredentialCryptor;
|
import org.cryptomator.util.crypto.CredentialCryptor;
|
||||||
@ -26,15 +25,12 @@ class S3ClientFactory {
|
|||||||
private AmazonS3 createApiClient(S3Cloud cloud, Context context) {
|
private AmazonS3 createApiClient(S3Cloud cloud, Context context) {
|
||||||
Region region = Region.getRegion(cloud.s3Region());
|
Region region = Region.getRegion(cloud.s3Region());
|
||||||
|
|
||||||
S3ClientOptions.Builder s3ClientOptionsBuilder = S3ClientOptions.builder();
|
|
||||||
if (region == null) {
|
if (region == null) {
|
||||||
region = Region.getRegion(Regions.DEFAULT_REGION);
|
region = Region.getRegion(Regions.DEFAULT_REGION);
|
||||||
s3ClientOptionsBuilder.setPayloadSigningEnabled(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AmazonS3Client client = new AmazonS3Client(new BasicAWSCredentials(decrypt(cloud.accessKey(), context), decrypt(cloud.secretKey(), context)), region);
|
AmazonS3Client client = new AmazonS3Client(new BasicAWSCredentials(decrypt(cloud.accessKey(), context), decrypt(cloud.secretKey(), context)), region);
|
||||||
client.setEndpoint(cloud.s3Endpoint());
|
client.setEndpoint(cloud.s3Endpoint());
|
||||||
client.setS3ClientOptions(s3ClientOptionsBuilder.build());
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user