fix config for thumbs
whoops Fix encoded URLs
This commit is contained in:
parent
2b5d32c313
commit
b49fed4cf5
2 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,7 @@ const config = {
|
||||||
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
|
SHARE_DOMAIN_URL: process.env.SHARE_DOMAIN_URL,
|
||||||
URL: process.env.URL,
|
URL: process.env.URL,
|
||||||
THUMBNAIL_CDN_URL: process.env.THUMBNAIL_CDN_URL,
|
THUMBNAIL_CDN_URL: process.env.THUMBNAIL_CDN_URL,
|
||||||
|
THUMBNAIL_CARDS_CDN_URL: process.env.THUMBNAIL_CARDS_CDN_URL,
|
||||||
THUMBNAIL_HEIGHT: process.env.THUMBNAIL_HEIGHT,
|
THUMBNAIL_HEIGHT: process.env.THUMBNAIL_HEIGHT,
|
||||||
THUMBNAIL_WIDTH: process.env.THUMBNAIL_WIDTH,
|
THUMBNAIL_WIDTH: process.env.THUMBNAIL_WIDTH,
|
||||||
THUMBNAIL_QUALITY: process.env.THUMBNAIL_QUALITY,
|
THUMBNAIL_QUALITY: process.env.THUMBNAIL_QUALITY,
|
||||||
|
|
|
@ -33,7 +33,8 @@ function getThumbnailCdnUrl(url) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
if (url) {
|
if (url) {
|
||||||
return `${THUMBNAIL_CARDS_CDN_URL}${btoa(url)}.jpg`;
|
const encodedURL = Buffer.from(url).toString('base64');
|
||||||
|
return `${THUMBNAIL_CARDS_CDN_URL}${encodedURL}.jpg`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue