From e0ed04c7c260016b6e5473dfa474140ddfa14446 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Thu, 4 Jan 2024 08:41:58 -0600 Subject: [PATCH] Upgraded to latest major minio client --- src/Foundatio.Minio/Foundatio.Minio.csproj | 2 +- src/Foundatio.Minio/Storage/MinioFileStorage.cs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Foundatio.Minio/Foundatio.Minio.csproj b/src/Foundatio.Minio/Foundatio.Minio.csproj index 39a99e2..b899f2f 100644 --- a/src/Foundatio.Minio/Foundatio.Minio.csproj +++ b/src/Foundatio.Minio/Foundatio.Minio.csproj @@ -4,7 +4,7 @@ File;Storage;Minio;Distributed; - + diff --git a/src/Foundatio.Minio/Storage/MinioFileStorage.cs b/src/Foundatio.Minio/Storage/MinioFileStorage.cs index 5bab22b..9f37e42 100644 --- a/src/Foundatio.Minio/Storage/MinioFileStorage.cs +++ b/src/Foundatio.Minio/Storage/MinioFileStorage.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -13,6 +13,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Minio; using Minio.DataModel; +using Minio.DataModel.Args; using Minio.Exceptions; namespace Foundatio.Storage { @@ -20,7 +21,7 @@ public class MinioFileStorage : IFileStorage { private readonly string _bucket; private readonly bool _shouldAutoCreateBucket; private bool _bucketExistsChecked; - private readonly MinioClient _client; + private readonly IMinioClient _client; private readonly ISerializer _serializer; private readonly ILogger _logger; @@ -41,7 +42,7 @@ public MinioFileStorage(Builder _serializer; - public MinioClient Client => _client; + public IMinioClient Client => _client; private async Task EnsureBucketExists() { if (!_shouldAutoCreateBucket || _bucketExistsChecked) @@ -353,7 +354,7 @@ private SearchCriteria GetRequestCriteria(string searchPattern) { }; } - private (MinioClient Client, string Bucket) CreateClient(MinioFileStorageOptions options) + private (IMinioClient Client, string Bucket) CreateClient(MinioFileStorageOptions options) { var connectionString = new MinioFileStorageConnectionStringBuilder(options.ConnectionString);