From be477818d791deb5681f0fc24a57490d5132c6c8 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 19 Jan 2024 16:22:00 +0800 Subject: [PATCH] =?UTF-8?q?[AWS=20=E5=AF=B9=E6=8E=A5=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BC=A0=E9=80=92=E6=96=87=E4=BB=B6=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }