fix(s3): remove port from AWS_ENDPOINT_URL_S3 and sync with server port in local mode

This commit is contained in:
yiling
2026-06-18 10:22:16 +08:00
parent a69dd6a660
commit ce457e1161
4 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -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}`)