From 037bf4c3ea357a064c722c7536f38f7026af553e Mon Sep 17 00:00:00 2001 From: Vsevolod Volkov <73965070+StLyn4@users.noreply.github.com> Date: Mon, 18 Aug 2025 06:48:48 +0000 Subject: [PATCH] api: update S3 client mode for presigned URL generation to EXTERNAL (#33) Signed-off-by: Vsevolod Volkov <73965070+StLyn4@users.noreply.github.com> --- Notesnook.API/Services/S3Service.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Notesnook.API/Services/S3Service.cs b/Notesnook.API/Services/S3Service.cs index 81262dc..e6afa3f 100644 --- a/Notesnook.API/Services/S3Service.cs +++ b/Notesnook.API/Services/S3Service.cs @@ -236,13 +236,13 @@ namespace Notesnook.API.Services return client.GetPreSignedURL(request); } - private string GetPresignedURLForUploadPart(string objectName, string uploadId, int partNumber) + private string GetPresignedURLForUploadPart(string objectName, string uploadId, int partNumber, S3ClientMode mode = S3ClientMode.EXTERNAL) { - var client = GetS3Client(S3ClientMode.INTERNAL); + var client = GetS3Client(mode); return client.GetPreSignedURL(new GetPreSignedUrlRequest { - BucketName = GetBucketName(S3ClientMode.INTERNAL), + BucketName = GetBucketName(mode), Expires = System.DateTime.Now.AddHours(1), Verb = HttpVerb.PUT, Key = objectName,