File tree 3 files changed +17
-0
lines changed
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -550,6 +550,10 @@ AWS_SECRET_ACCESS_KEY=
550
550
AWS_REGION =
551
551
AWS_S3_BUCKET =
552
552
AWS_S3_UPLOAD_PATH =
553
+ AWS_S3_ENDPOINT =
554
+ AWS_S3_SSL_ENABLED =
555
+ AWS_S3_FORCE_PATH_STYLE =
556
+
553
557
554
558
# Deepgram
555
559
DEEPGRAM_API_KEY =
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ AWS_SECRET_ACCESS_KEY=your_aws_secret_key
54
54
AWS_REGION=your_aws_region
55
55
AWS_S3_BUCKET=your_s3_bucket
56
56
AWS_S3_UPLOAD_PATH=your_upload_path
57
+ AWS_S3_ENDPOINT=an_alternative_endpoint
58
+ AWS_S3_SSL_ENABLED=boolean(true|false)
59
+ AWS_S3_FORCE_PATH_STYLE=boolean(true|false)
57
60
```
58
61
59
62
## Usage
Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ export class AwsS3Service extends Service implements IAwsS3Service {
58
58
return false ;
59
59
}
60
60
61
+ /** Optional fields to allow for other providers */
62
+ const endpoint = this . runtime . getSetting ( "AWS_S3_ENDPOINT" ) ;
63
+ const sslEnabled = this . runtime . getSetting ( "AWS_S3_SSL_ENABLED" ) ;
64
+ const forcePathStyle = this . runtime . getSetting ( "AWS_S3_FORCE_PATH_STYLE" ) ;
65
+
61
66
this . s3Client = new S3Client ( {
67
+ ...( endpoint ? { endpoint } : { } ) ,
68
+ ...( sslEnabled ? { sslEnabled } : { } ) ,
69
+ ...( forcePathStyle
70
+ ? { forcePathStyle : Boolean ( forcePathStyle ) }
71
+ : { } ) ,
62
72
region : AWS_REGION ,
63
73
credentials : {
64
74
accessKeyId : AWS_ACCESS_KEY_ID ,
You can’t perform that action at this time.
0 commit comments