Skip to content

Commit 55eb4c0

Browse files
committed
refactor: simplify requestChecksumCalculation logic in S3 client configuration
1 parent 599f653 commit 55eb4c0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/file/file.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ export class FileService {
7676
const s3Client = new S3Client({
7777
region: region,
7878
endpoint: endpoint,
79-
requestChecksumCalculation: endpoint.includes('localhost')
80-
? 'WHEN_REQUIRED'
81-
: undefined,
79+
requestChecksumCalculation:
80+
process.env.NODE_ENV === 'development' ? 'WHEN_REQUIRED' : undefined,
8281
credentials: {
8382
accessKeyId: key,
8483
secretAccessKey: secret,

0 commit comments

Comments
 (0)