File tree Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 1
1
import type { Request , Response } from 'express' ;
2
2
3
3
import { AssumeRoleCommand , STSClient } from '@aws-sdk/client-sts' ;
4
- import { EVER_API , EVER_REGION , S3_BUCKET } from '@hey/data/constants' ;
4
+ import { EVER_API , EVER_BUCKET , EVER_REGION } from '@hey/data/constants' ;
5
5
import logger from '@hey/helpers/logger' ;
6
6
import catchedError from 'src/helpers/catchedError' ;
7
7
import { rateLimiter } from 'src/helpers/middlewares/rateLimiter' ;
@@ -19,7 +19,7 @@ const params = {
19
19
"s3:AbortMultipartUpload"
20
20
],
21
21
"Resource": [
22
- "arn:aws:s3:::${ S3_BUCKET . HEY_MEDIA } /*"
22
+ "arn:aws:s3:::${ EVER_BUCKET } /*"
23
23
]
24
24
}
25
25
]
Original file line number Diff line number Diff line change 5
5
ListObjectsV2Command ,
6
6
S3
7
7
} from '@aws-sdk/client-s3' ;
8
- import { EVER_API , EVER_REGION , S3_BUCKET } from '@hey/data/constants' ;
8
+ import { EVER_API , EVER_BUCKET , EVER_REGION } from '@hey/data/constants' ;
9
9
import logger from '@hey/helpers/logger' ;
10
10
11
11
const truncate4EverlandBucket = async ( ) => {
@@ -26,7 +26,7 @@ const truncate4EverlandBucket = async () => {
26
26
currentDate . setDate ( currentDate . getDate ( ) - daysToSubtract )
27
27
) ;
28
28
29
- const Bucket = S3_BUCKET . HEY_MEDIA ;
29
+ const Bucket = EVER_BUCKET ;
30
30
let ContinuationToken : string | undefined ;
31
31
let objectsToDelete : { Key : string } [ ] = [ ] ;
32
32
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import { S3 } from '@aws-sdk/client-s3';
4
4
import { Upload } from '@aws-sdk/lib-storage' ;
5
5
import {
6
6
EVER_API ,
7
+ EVER_BUCKET ,
7
8
EVER_REGION ,
8
- HEY_API_URL ,
9
- S3_BUCKET
9
+ HEY_API_URL
10
10
} from '@hey/data/constants' ;
11
11
import axios from 'axios' ;
12
12
import { v4 as uuid } from 'uuid' ;
@@ -73,7 +73,7 @@ const uploadToIPFS = async (
73
73
const file = data [ i ] ;
74
74
const params = {
75
75
Body : file ,
76
- Bucket : S3_BUCKET . HEY_MEDIA ,
76
+ Bucket : EVER_BUCKET ,
77
77
ContentType : file . type ,
78
78
Key : `${ currentDate } /${ uuid ( ) } `
79
79
} ;
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ export const IPFS_GATEWAY = 'https://gw.ipfs-lens.dev/ipfs';
95
95
export const ARWEAVE_GATEWAY = 'https://gateway.irys.xyz' ;
96
96
export const EVER_API = 'https://endpoint.4everland.co' ;
97
97
export const EVER_REGION = '4EVERLAND' ;
98
+ export const EVER_BUCKET = 'hey-media' ;
98
99
export const DEFAULT_OG = `${ STATIC_IMAGES_URL } /og/cover.png` ;
99
100
export const PLACEHOLDER_IMAGE = `${ STATIC_IMAGES_URL } /placeholder.webp` ;
100
101
export const MOONPAY_URL = IS_MAINNET
@@ -119,11 +120,6 @@ export const COVER = 'tr:w-1350,h-350';
119
120
export const VIDEO_THUMBNAIL = 'tr:h-1000' ;
120
121
export const ATTACHMENT = 'tr:w-1000' ;
121
122
122
- // S3 bucket
123
- export const S3_BUCKET = {
124
- HEY_MEDIA : 'hey-media'
125
- } ;
126
-
127
123
// Known Lens Protocol Attributes
128
124
export const KNOWN_ATTRIBUTES = {
129
125
HIDE_OEMBED : 'hideOembed' ,
You can’t perform that action at this time.
0 commit comments