Check config on load (#4170)
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
@ -50,8 +50,9 @@ async function save(path: string, name: string, type: string, hash: string, size
|
||||
if (type === 'image/webp') ext = '.webp';
|
||||
}
|
||||
|
||||
const baseUrl = config.drive.baseUrl
|
||||
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;
|
||||
const baseUrl = config.drive.baseUrl.getOrElse(
|
||||
`${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`
|
||||
);
|
||||
|
||||
// for original
|
||||
const key = `${config.drive.prefix}/${uuid.v4()}${ext}`;
|
||||
|
Reference in New Issue
Block a user