fix: added env variable for support for forcepathstyle on s3 (#181)

This commit is contained in:
sidnelui-krystal
2024-08-20 20:05:59 +08:00
committed by GitHub
parent 463480ae67
commit c810d0b314
3 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ AWS_S3_SECRET_ACCESS_KEY=
AWS_S3_REGION=
AWS_S3_BUCKET=
AWS_S3_ENDPOINT=
AWS_S3_FORCE_PATH_STYLE=
# options: smtp | postmark
MAIL_DRIVER=smtp

View File

@ -63,6 +63,10 @@ export class EnvironmentService {
return this.configService.get<string>('AWS_S3_ENDPOINT');
}
getAwsS3ForcePathStyle(): boolean {
return this.configService.get<boolean>('AWS_S3_FORCE_PATH_STYLE')
}
getAwsS3Url(): string {
return this.configService.get<string>('AWS_S3_URL');
}

View File

@ -48,6 +48,7 @@ export const storageDriverConfigProvider = {
endpoint: environmentService.getAwsS3Endpoint(),
bucket: environmentService.getAwsS3Bucket(),
baseUrl: environmentService.getAwsS3Url(),
forcePathStyle: environmentService.getAwsS3ForcePathStyle(),
credentials: undefined,
},
};