minio 测试修改
parent
a37ccac097
commit
1175696590
|
@ -28,7 +28,7 @@
|
|||
},
|
||||
|
||||
"MinIO": {
|
||||
"endpoint": "http://192.168.3.68",
|
||||
"endpoint": "192.168.3.68",
|
||||
"port": "8001",
|
||||
"useSSL": false,
|
||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
||||
|
|
|
@ -17,11 +17,14 @@ using Microsoft.Extensions.Logging;
|
|||
using Microsoft.Extensions.Options;
|
||||
using MiniExcelLibs;
|
||||
using Minio;
|
||||
using Minio.DataModel.Args;
|
||||
using NPOI.HPSF;
|
||||
using NPOI.POIFS.Crypt;
|
||||
using SharpCompress.Common;
|
||||
using Spire.Doc;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -166,12 +169,16 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
var minioClient = new MinioClient().WithEndpoint($"{minIO.endpoint}:{minIO.port}")
|
||||
.WithCredentials(minIO.accessKey, minIO.secretKey)
|
||||
.WithCredentials(minIO.accessKey, minIO.secretKey).WithSSL(false)
|
||||
.Build();
|
||||
|
||||
var putObjectArgs = new PutObjectArgs()
|
||||
.WithBucket(minIO.bucketName)
|
||||
.WithObject("myfolder/test.txt")
|
||||
.WithFileName("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx");
|
||||
|
||||
await minioClient.PutObjectAsync(putObjectArgs);
|
||||
|
||||
//ResponseOutput.Ok(options)
|
||||
return await Task.FromResult<IResponseOutput>(ResponseOutput.Ok(options));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue