feat(s3): allow disabling upload checksum (#804)

* S3 - toggle useChecksum

* Update frontend/src/i18n/translations/en-US.ts

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
marekhanzlik
2025-04-04 14:59:09 +02:00
committed by GitHub
parent 8e828311fe
commit 73a76a9d5b
4 changed files with 13 additions and 1 deletions

View File

@@ -349,6 +349,10 @@ export const configVariables = {
defaultValue: "",
obscured: true,
},
useChecksum: {
type: "boolean",
defaultValue: "true",
},
},
legal: {
enabled: {

View File

@@ -275,6 +275,8 @@ export class S3FileService {
}
getS3Instance(): S3Client {
const checksumCalculation = this.config.get("s3.useChecksum") === true ? null : "WHEN_REQUIRED";
return new S3Client({
endpoint: this.config.get("s3.endpoint"),
region: this.config.get("s3.region"),
@@ -283,6 +285,8 @@ export class S3FileService {
secretAccessKey: this.config.get("s3.secret"),
},
forcePathStyle: true,
requestChecksumCalculation: checksumCalculation,
responseChecksumValidation: checksumCalculation,
});
}