From a12f33597645e6a9d7138e3b61d08843ace4698e Mon Sep 17 00:00:00 2001 From: slaveeks Date: Fri, 8 Jul 2022 16:32:12 +0300 Subject: [PATCH] Updated docs, fixed using local favicon --- README.md | 16 ++++++++-------- src/backend/utils/downloadFavicon.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b64b056..26082e6 100644 --- a/README.md +++ b/README.md @@ -87,14 +87,14 @@ yarn test You can configure application using configs in /config directory. -| Property | Role | -|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | port | to set port of application | - | database | to name directory with data | - | rcFile | to set destination of codexdocsrc config file | - | uploads | to set destination of directory to save uploads | - | secret | to set secret | - | favicon | to set url or path to get favicon. Server uploads file by url and saves it to temporary directory. And you can get favicon by /favicon static route of application | +| Property | Role | +|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | port | to set port of application | + | database | to name directory with data | + | rcFile | to set destination of codexdocsrc config file | + | uploads | to set destination of directory to save uploads | + | secret | to set secret | + | favicon | to set url or favicon path (favicon need to be in /public directory), like `/myFavicon.png`, to get favicon. Server uploads file by url and saves it to temporary directory. And you can get favicon by /favicon static route of application | You can configure application using configs in /config directory. diff --git a/src/backend/utils/downloadFavicon.ts b/src/backend/utils/downloadFavicon.ts index d2f417c..ffecfb7 100644 --- a/src/backend/utils/downloadFavicon.ts +++ b/src/backend/utils/downloadFavicon.ts @@ -49,7 +49,7 @@ export async function downloadFavicon(destination: string, faviconFolder: string // Check if string is url if (!checkIsUrl(destination)) { return { - destination: destination, + destination: `/${filename}`, type: `image/${format}`, } as FaviconData; }