Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatible with MinIO server #42

Open
mirror222 opened this issue Jan 11, 2023 · 1 comment
Open

compatible with MinIO server #42

mirror222 opened this issue Jan 11, 2023 · 1 comment

Comments

@mirror222
Copy link

        public AmazonStorageProvider(AmazonProviderOptions options)
        {
            _serviceUrl = string.IsNullOrEmpty(options.ServiceUrl) ? DefaultServiceUrl : options.ServiceUrl;
            _bucket = options.Bucket;
            _serverSideEncryptionMethod = options.ServerSideEncryptionMethod;
            _chunkedThreshold = options.ChunkedUploadThreshold;

            var S3Config = new AmazonS3Config
            {
                ServiceURL = _serviceUrl,
                Timeout = options.Timeout ?? ClientConfig.MaxTimeout,
                // adding ForcePathStyle = true to compatible with MinIO server
                ForcePathStyle = !string.IsNullOrEmpty(options.ServiceUrl),
            };

            _s3Client = new AmazonS3Client(ReadAwsCredentials(options), S3Config);
        }
@zabulus
Copy link

zabulus commented Mar 24, 2023

+1 for this issue. I propose even to go further. Allow end-user to specify Action<AmazonS3Config> to make custom configuration of AmazonS3Config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants