Skip to content

Commit 0fe77e4

Browse files
authored
Merge pull request #284 from mV22110702/fix/th-283-fix-env-for-s3
th-283: Fixed .env.example
2 parents aed4e30 + 1d57a8b commit 0fe77e4

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

backend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ AWS_ACCESS_KEY_ID=YOUR_KEY
1818
AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
1919
S3_REGION=REGION
2020
BUCKET_NAME=BUCKET
21+
SIGNED_URL_EXPIRES_IN_SECONDS=NUMBER
2122

2223
#
2324
# SENDGRID

backend/src/libs/packages/config/config.package.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ class Config implements IConfig {
9393
env: 'S3_REGION',
9494
default: null,
9595
},
96-
SIGNED_URL_EXPIRES_IN: {
96+
SIGNED_URL_EXPIRES_IN_SECONDS: {
9797
doc: 'Number of seconds a signed URL expires in',
9898
format: String,
99-
env: 'SIGNED_URL_EXPIRES_IN',
99+
env: 'SIGNED_URL_EXPIRES_IN_SECONDS',
100100
default: null,
101101
},
102102
},

backend/src/libs/packages/config/libs/types/environment-schema.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type EnvironmentSchema = {
1212
S3: {
1313
BUCKET_NAME: string;
1414
REGION: string;
15-
SIGNED_URL_EXPIRES_IN: number;
15+
SIGNED_URL_EXPIRES_IN_SECONDS: number;
1616
};
1717
};
1818
JWT: {

backend/src/libs/packages/s3-client-service/s3-client-service.package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class S3ClientService {
3535
},
3636
});
3737
this.bucketName = config.ENV.AWS.S3.BUCKET_NAME;
38-
this.signedUrlExpiresIn = config.ENV.AWS.S3.SIGNED_URL_EXPIRES_IN;
38+
this.signedUrlExpiresIn = config.ENV.AWS.S3.SIGNED_URL_EXPIRES_IN_SECONDS;
3939
this.logger = logger;
4040
}
4141

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ erDiagram
115115
files {
116116
id serial PK "not null"
117117
key varchar "not null, unique"
118+
name varchar "not null"
118119
content_type varchar "not null"
119120
created_at timestamp "not null"
120121
updated_at timestamp "not null"

0 commit comments

Comments
 (0)