diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 4cacd52f1..26cbd2b3c 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -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); }