Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (s3): Include checksum over file upload

Rostislav Dugine957fb67dd55
diff --git a/backend/internal/features/storages/models/s3/model.go b/backend/internal/features/storages/models/s3/model.go
index ef2fba02..ad2cab16 100644
--- a/backend/internal/features/storages/models/s3/model.go
+++ b/backend/internal/features/storages/models/s3/model.go
@@ -147,7 +147,9 @@ func (s *S3Storage) SaveFile(
objectKey,
bytes.NewReader([]byte{}),
0,
- minio.PutObjectOptions{},
+ minio.PutObjectOptions{
+ SendContentMd5: true,
+ },
)
if err != nil {
return fmt.Errorf("failed to upload empty file: %w", err)
@@ -283,7 +285,9 @@ func (s *S3Storage) TestConnection(encryptor encryption.FieldEncryptor) error {
testObjectKey,
testReader,
int64(len(testData)),
- minio.PutObjectOptions{},
+ minio.PutObjectOptions{
+ SendContentMd5: true,
+ },
)
if err != nil {
return fmt.Errorf("failed to upload test file to S3: %w", err)