class 添加默认方法,支持老的代码

This commit is contained in:
2024-04-16 06:57:56 +08:00
parent 6ef7aca8ae
commit a1f10b9c09
8 changed files with 36 additions and 11 deletions
+3 -2
View File
@@ -2,7 +2,7 @@
using System.IO;
using Microsoft.AspNetCore.Http;
using Minio;
using SimApi.Configs;
using SimApi.Configurations;
namespace SimApi.Helpers;
@@ -14,7 +14,7 @@ public class SimApiStorage
private string ServeUrl { get; }
public string Bucket { get; }
private string Bucket { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
@@ -46,6 +46,7 @@ public class SimApiStorage
{
mcb = mcb.WithSSL();
}
Mc = mcb.Build();
var found = Mc.BucketExistsAsync(new BucketExistsArgs().WithBucket(Bucket)).Result;