[AWS 对接上传 需要传递文件大小]
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-01-19 16:22:00 +08:00
parent e52523f1fa
commit f94e9c98f9
1 changed files with 4 additions and 2 deletions

View File

@ -163,7 +163,8 @@ namespace IRaCIS.Core.Application.Helper
var putObjectArgs = new PutObjectArgs() var putObjectArgs = new PutObjectArgs()
.WithBucket(minIOConfig.bucketName) .WithBucket(minIOConfig.bucketName)
.WithObject(ossRelativePath) .WithObject(ossRelativePath)
.WithStreamData(memoryStream); .WithStreamData(memoryStream)
.WithObjectSize(memoryStream.Length);
await minioClient.PutObjectAsync(putObjectArgs); await minioClient.PutObjectAsync(putObjectArgs);
} }
@ -179,7 +180,8 @@ namespace IRaCIS.Core.Application.Helper
var putObjectArgs = new PutObjectArgs() var putObjectArgs = new PutObjectArgs()
.WithBucket(minIOConfig.bucketName) .WithBucket(minIOConfig.bucketName)
.WithObject(ossRelativePath) .WithObject(ossRelativePath)
.WithStreamData(memoryStream); .WithStreamData(memoryStream)
.WithObjectSize(memoryStream.Length);
await minioClient.PutObjectAsync(putObjectArgs); await minioClient.PutObjectAsync(putObjectArgs);
} }