File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22
22
"test:e2e" : " bun test ./test/app.e2e-spec.ts"
23
23
},
24
24
"dependencies" : {
25
- "@aws-sdk/client-s3" : " ^3.717 .0" ,
26
- "@aws-sdk/s3-request-presigner" : " ^3.717 .0" ,
25
+ "@aws-sdk/client-s3" : " 3.800 .0" ,
26
+ "@aws-sdk/s3-request-presigner" : " 3.800 .0" ,
27
27
"@encode42/nbs.js" : " ^5.0.2" ,
28
28
"@nestjs-modules/mailer" : " ^2.0.2" ,
29
29
"@nestjs/common" : " ^10.4.15" ,
Original file line number Diff line number Diff line change @@ -73,17 +73,20 @@ export class FileService {
73
73
this . region = region ;
74
74
75
75
// Create S3 client
76
- const s3Config = new S3Client ( {
76
+ const s3Client = new S3Client ( {
77
77
region : region ,
78
78
endpoint : endpoint ,
79
+ requestChecksumCalculation : endpoint . includes ( 'localhost' )
80
+ ? 'WHEN_REQUIRED'
81
+ : undefined ,
79
82
credentials : {
80
83
accessKeyId : key ,
81
84
secretAccessKey : secret ,
82
85
} ,
83
86
forcePathStyle : endpoint . includes ( 'localhost' ) ? true : false ,
84
87
} ) ;
85
88
86
- return s3Config ;
89
+ return s3Client ;
87
90
}
88
91
89
92
// Uploads a song to the S3 bucket and returns the key
@@ -245,7 +248,7 @@ export class FileService {
245
248
const arrayBuffer = new ArrayBuffer ( byteArray . length ) ;
246
249
const view = new Uint8Array ( arrayBuffer ) ;
247
250
for ( let i = 0 ; i < byteArray . length ; i ++ ) {
248
- view [ i ] = byteArray [ i ] ;
251
+ view [ i ] = byteArray [ i ] ;
249
252
}
250
253
return arrayBuffer ;
251
254
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments