diff --git a/apps/OpenSignServer/cloud/parsefunction/getSignedUrl.js b/apps/OpenSignServer/cloud/parsefunction/getSignedUrl.js index 8753f30a6..24b15de21 100644 --- a/apps/OpenSignServer/cloud/parsefunction/getSignedUrl.js +++ b/apps/OpenSignServer/cloud/parsefunction/getSignedUrl.js @@ -8,7 +8,7 @@ export default function getPresignedUrl(url, adapter) { AWS.config.update({ credentials: credentials, region: adapter?.region || process.env.DO_REGION }); const spacesEndpoint = adapter?.endpoint || new AWS.Endpoint(process.env.DO_ENDPOINT); - const s3 = new AWS.S3({ endpoint: spacesEndpoint }); + const s3 = new AWS.S3({ endpoint: spacesEndpoint, signatureVersion: "v4" }); // Create a new URL object const parsedUrl = new URL(url); diff --git a/apps/OpenSignServer/cloud/parsefunction/uploadFiletoS3.js b/apps/OpenSignServer/cloud/parsefunction/uploadFiletoS3.js index d17f30420..3fe0a6d2a 100644 --- a/apps/OpenSignServer/cloud/parsefunction/uploadFiletoS3.js +++ b/apps/OpenSignServer/cloud/parsefunction/uploadFiletoS3.js @@ -14,6 +14,7 @@ async function uploadFileToS3(buffer, fileName, mimeType, adapter) { client = new S3Client({ region: adapter?.region, credentials: { accessKeyId: adapter?.accessKeyId, secretAccessKey: adapter?.secretAccessKey }, + signatureVersion: 'v4' }); } const prefixId = crypto.randomBytes(16).toString('hex');