From 5c4b6873c403d104df97c69760858cec7ea09c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serdar=20=C3=96zer?= Date: Thu, 2 Apr 2026 17:05:49 +0200 Subject: [PATCH 1/2] feat: checksum parameters are converted to be configurable --- s3/README.md | 5 ++++- s3/config/config.go | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/s3/README.md b/s3/README.md index 50b4d58..886084a 100644 --- a/s3/README.md +++ b/s3/README.md @@ -30,7 +30,10 @@ The S3 client requires a JSON configuration file with the following structure: "upload_part_size": (optional - default: 5242880), # 5 MB "multipart_copy_threshold": (optional - default: 5368709120), # 5 GB - files larger than this use multipart copy "multipart_copy_part_size": (optional - default: 104857600), # 100 MB - must be at least 5 MB - "single_upload_threshold": (optional - default: 0) # bytes; files <= this use a single PutObject call, larger files use multipart upload. 0 means always use multipart. Max 5 GB for AWS S3. GCS ignores this and always uses single upload. + "single_upload_threshold": (optional - default: 0), # bytes; files <= this use a single PutObject call, larger files use multipart upload. 0 means always use multipart. Max 5 GB for AWS S3. GCS ignores this and always uses single upload. + "request_checksum_calculation_enabled": (optional - default: true), + "response_checksum_calculation_enabled": (optional - default: true), + "uploader_request_checksum_calculation_enabled": (optional - default: true) } ``` diff --git a/s3/config/config.go b/s3/config/config.go index 5147805..1631f54 100644 --- a/s3/config/config.go +++ b/s3/config/config.go @@ -27,9 +27,9 @@ type S3Cli struct { HostStyle bool `json:"host_style"` SwiftAuthAccount string `json:"swift_auth_account"` SwiftTempURLKey string `json:"swift_temp_url_key"` - RequestChecksumCalculationEnabled bool - ResponseChecksumCalculationEnabled bool - UploaderRequestChecksumCalculationEnabled bool + RequestChecksumCalculationEnabled bool `json:"request_checksum_calculation_enabled"` + ResponseChecksumCalculationEnabled bool `json:"response_checksum_calculation_enabled"` + UploaderRequestChecksumCalculationEnabled bool `json:"uploader_request_checksum_calculation_enabled"` // Optional knobs to tune transfer performance. // If zero, the client will apply sensible defaults (handled by the S3 client layer). // Part size values are provided in bytes. From 341135ee916ed3d9423ed9535b021fb56c8208c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serdar=20=C3=96zer?= Date: Thu, 2 Apr 2026 17:14:12 +0200 Subject: [PATCH 2/2] fix: formatting is fixed --- s3/config/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/s3/config/config.go b/s3/config/config.go index 1631f54..6420e24 100644 --- a/s3/config/config.go +++ b/s3/config/config.go @@ -27,9 +27,9 @@ type S3Cli struct { HostStyle bool `json:"host_style"` SwiftAuthAccount string `json:"swift_auth_account"` SwiftTempURLKey string `json:"swift_temp_url_key"` - RequestChecksumCalculationEnabled bool `json:"request_checksum_calculation_enabled"` - ResponseChecksumCalculationEnabled bool `json:"response_checksum_calculation_enabled"` - UploaderRequestChecksumCalculationEnabled bool `json:"uploader_request_checksum_calculation_enabled"` + RequestChecksumCalculationEnabled bool `json:"request_checksum_calculation_enabled"` + ResponseChecksumCalculationEnabled bool `json:"response_checksum_calculation_enabled"` + UploaderRequestChecksumCalculationEnabled bool `json:"uploader_request_checksum_calculation_enabled"` // Optional knobs to tune transfer performance. // If zero, the client will apply sensible defaults (handled by the S3 client layer). // Part size values are provided in bytes.