Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing

This commit is contained in:
he
2024-01-12 09:40:37 +08:00
4 changed files with 14 additions and 8 deletions
+10 -5
View File
@@ -19,10 +19,10 @@ using SkiaSharp;
namespace IRaCIS.Core.Application.Helper
{
public class MinIOOptions: AWSOptions
public class MinIOOptions : AWSOptions
{
public int port { get; set; }
}
public class AWSOptions
@@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Helper
public OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options)
{
ObjectStoreServiceOptions = options.CurrentValue;
ObjectStoreServiceOptions = options.CurrentValue;
}
/// <summary>
@@ -125,7 +125,10 @@ namespace IRaCIS.Core.Application.Helper
/// <returns></returns>
public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName)
{
var ossRelativePath = oosFolderPath + "/" + fileRealName;
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}";
//var ossRelativePath = oosFolderPath + "/" + fileRealName;
using (var memoryStream = new MemoryStream())
{
@@ -204,7 +207,9 @@ namespace IRaCIS.Core.Application.Helper
{
var localFileName = Path.GetFileName(localFilePath);
var ossRelativePath = oosFolderPath + "/" + localFileName;
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}";
//var ossRelativePath = oosFolderPath + "/" + localFileName;
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")