Skip to content
Snippets Groups Projects
Unverified Commit 44213812 authored by YS's avatar YS Committed by GitHub
Browse files

空文字列のobjectStorageEndtpoinをnullと同様に扱う (#10312)

parent 7e9d3d9b
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,14 @@ export class S3Service {
@bindThis
public getS3(meta: Meta) {
const u = meta.objectStorageEndpoint != null
const u = meta.objectStorageEndpoint
? `${meta.objectStorageUseSSL ? 'https://' : 'http://'}${meta.objectStorageEndpoint}`
: `${meta.objectStorageUseSSL ? 'https://' : 'http://'}example.net`;
return new S3({
endpoint: meta.objectStorageEndpoint ?? undefined,
endpoint: meta.objectStorageEndpoint && meta.objectStorageEndpoint.length > 0
? meta.objectStorageEndpoint
: undefined,
accessKeyId: meta.objectStorageAccessKey!,
secretAccessKey: meta.objectStorageSecretKey!,
region: meta.objectStorageRegion ?? undefined,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment