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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -465,6 +465,8 @@ export default {
|
||||
"admin.config.s3.key.description": "The key which allows you to access the S3 bucket.",
|
||||
"admin.config.s3.secret": "Secret",
|
||||
"admin.config.s3.secret.description": "The secret which allows you to access the S3 bucket.",
|
||||
"admin.config.s3.use-checksum": "Použít checksum",
|
||||
"admin.config.s3.use-checksum.description": "Vypněte pro backendy které nepodporují checksum (např. B2)",
|
||||
"admin.config.category.legal": "Legal",
|
||||
"admin.config.legal.enabled": "Enable legal notices",
|
||||
"admin.config.legal.enabled.description": "Whether to show a link to imprint and privacy policy in the footer.",
|
||||
@@ -529,4 +531,4 @@ export default {
|
||||
"common.error.exact-length": "Musí mít přesně {length} znaků",
|
||||
"common.error.invalid-number": "Musí být číslo",
|
||||
"common.error.field-required": "Toto pole je povinné"
|
||||
};
|
||||
};
|
||||
|
||||
@@ -655,6 +655,8 @@ export default {
|
||||
"admin.config.s3.key.description": "The key which allows you to access the S3 bucket.",
|
||||
"admin.config.s3.secret": "Secret",
|
||||
"admin.config.s3.secret.description": "The secret which allows you to access the S3 bucket.",
|
||||
"admin.config.s3.use-checksum": "Use checksum",
|
||||
"admin.config.s3.use-checksum.description": "Turn off for backends that do not support checksum (e.g. B2).",
|
||||
|
||||
"admin.config.category.legal": "Legal",
|
||||
"admin.config.legal.enabled": "Enable legal notices",
|
||||
|
||||
Reference in New Issue
Block a user