should allow better configuration and overrides.
This commit is contained in:
parent
fa07c52ccd
commit
d78a90d6f2
@ -12,10 +12,10 @@ namespace PoweredSoft.Storage.S3
|
|||||||
{
|
{
|
||||||
public class S3StorageProvider : IStorageProvider
|
public class S3StorageProvider : IStorageProvider
|
||||||
{
|
{
|
||||||
private readonly string endpoint;
|
protected readonly string endpoint;
|
||||||
private readonly string bucketName;
|
protected readonly string bucketName;
|
||||||
private readonly string accessKey;
|
protected readonly string accessKey;
|
||||||
private readonly string secret;
|
protected readonly string secret;
|
||||||
|
|
||||||
public S3StorageProvider(string endpoint, string bucketName, string accessKey, string secret)
|
public S3StorageProvider(string endpoint, string bucketName, string accessKey, string secret)
|
||||||
{
|
{
|
||||||
@ -25,11 +25,11 @@ namespace PoweredSoft.Storage.S3
|
|||||||
this.secret = secret;
|
this.secret = secret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IAmazonS3 GetClient()
|
protected virtual IAmazonS3 GetClient()
|
||||||
{
|
{
|
||||||
var config = new AmazonS3Config
|
var config = new AmazonS3Config
|
||||||
{
|
{
|
||||||
ServiceURL = $"https://{endpoint}"
|
ServiceURL = endpoint
|
||||||
};
|
};
|
||||||
var client = new AmazonS3Client(this.accessKey, this.secret, config);
|
var client = new AmazonS3Client(this.accessKey, this.secret, config);
|
||||||
return client;
|
return client;
|
||||||
|
Loading…
Reference in New Issue
Block a user