[AWS 对接上传 需要传递文件大小]

Uat_Study
hang 2024-01-19 16:22:00 +08:00
parent 41bbb75407
commit be477818d7
1 changed files with 4 additions and 2 deletions

View File

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