fix: download url
This commit is contained in:
@@ -7,9 +7,10 @@ export function replaceCDNUrl(url: string) {
|
||||
);
|
||||
// When using digital ocean, we need to use the bucket name in the URL
|
||||
} else if (process.env.SPACES_CDN_FORCE_PATH_STYLE === "false") {
|
||||
const cdnUrl = new URL(process.env.SPACES_ENDPOINT_CDN!);
|
||||
url = url.replace(
|
||||
`${process.env.SPACES_ENDPOINT}/${process.env.SPACES_BUCKET}`,
|
||||
`${process.env.SPACES_BUCKET}.${process.env.SPACES_ENDPOINT_CDN}}`
|
||||
`${cdnUrl.protocol}//${process.env.SPACES_BUCKET}.${cdnUrl.host}`
|
||||
);
|
||||
} else {
|
||||
url = url.replace(
|
||||
|
||||
Reference in New Issue
Block a user