Skip to content

Broken AddMinio(...) method: Endpoint turns back to default #873

@picolino

Description

@picolino

I connect Minio sdk in my services this way:

services.AddMinio(o =>
            {
                o.WithEndpoint("my.s3.com")
                    .WithCredentials(
                        Environment.GetEnvironmentVariable(s3AccessKeyEnv),
                        Environment.GetEnvironmentVariable(s3SecretKeyEnv)
                    );
            },
            ServiceLifetime.Scoped
        );

But when I try to use API through IMinioClient I have 'play.min.io' as an endpoint.

A little dig inside shows that in this code line we should also pass configureClient.
https://github.com/minio/minio-dotnet/blob/master/Minio/ServiceCollectionExtensions.cs#L47

And here Endpoint goes back to 'play.min.io':
https://github.com/minio/minio-dotnet/blob/master/Minio/MinioClientFactory.cs#L45

UPD: Minio version: 6.0.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions