mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 21:44:27 +00:00
fix(s3): remove port from AWS_ENDPOINT_URL_S3 and sync with server port in local mode
This commit is contained in:
@@ -451,8 +451,8 @@ export class LocalStorageService implements S3Service {
|
||||
}
|
||||
|
||||
const storageBackend = process.env.STORAGE_BACKEND || 'local'
|
||||
const s3Endpoint =
|
||||
process.env.AWS_ENDPOINT_URL_S3 || `http://localhost:${process.env.SHUMAI_SERVER_PORT || '3000'}`
|
||||
const port = process.env.SHUMAI_SERVER_PORT || '3000'
|
||||
const s3Endpoint = process.env.AWS_ENDPOINT_URL_S3 || 'http://localhost'
|
||||
|
||||
export const s3Service: S3Service =
|
||||
storageBackend === 's3'
|
||||
@@ -464,4 +464,4 @@ export const s3Service: S3Service =
|
||||
process.env.S3_USE_SSL === 'true',
|
||||
process.env.S3_REGION || 'auto',
|
||||
)
|
||||
: new LocalStorageService(s3Endpoint)
|
||||
: new LocalStorageService(`${s3Endpoint}:${port}`)
|
||||
|
||||
Reference in New Issue
Block a user