mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-09 09:37:01 +02:00
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:
@@ -349,6 +349,10 @@ export const configVariables = {
|
||||
defaultValue: "",
|
||||
obscured: true,
|
||||
},
|
||||
useChecksum: {
|
||||
type: "boolean",
|
||||
defaultValue: "true",
|
||||
},
|
||||
},
|
||||
legal: {
|
||||
enabled: {
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user