mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🛠️ fix: Ensure imageOutputType
is Always Defined (#2438)
* avatar fix * chore: ensure `imageOutputType` is always defined * ci(AppService): extra test for default value * chore: replace default value for `desiredFormat` with `EImageOutputType` enum
This commit is contained in:
parent
bf4e64ce63
commit
3c184e9410
3 changed files with 15 additions and 5 deletions
|
@ -36,6 +36,7 @@ const AppService = async (app) => {
|
|||
const config = (await loadCustomConfig()) ?? {};
|
||||
|
||||
const fileStrategy = config.fileStrategy ?? FileSources.local;
|
||||
const imageOutputType = config?.imageOutputType ?? EImageOutputType.PNG;
|
||||
process.env.CDN_PROVIDER = fileStrategy;
|
||||
|
||||
if (fileStrategy === FileSources.firebase) {
|
||||
|
@ -58,9 +59,10 @@ const AppService = async (app) => {
|
|||
|
||||
if (!Object.keys(config).length) {
|
||||
app.locals = {
|
||||
availableTools,
|
||||
fileStrategy,
|
||||
socialLogins,
|
||||
availableTools,
|
||||
imageOutputType,
|
||||
paths,
|
||||
};
|
||||
|
||||
|
@ -177,12 +179,12 @@ const AppService = async (app) => {
|
|||
|
||||
app.locals = {
|
||||
socialLogins,
|
||||
availableTools,
|
||||
fileStrategy,
|
||||
availableTools,
|
||||
imageOutputType,
|
||||
fileConfig: config?.fileConfig,
|
||||
interface: config?.interface,
|
||||
secureImageLinks: config?.secureImageLinks,
|
||||
imageOutputType: config?.imageOutputType?.toLowerCase() ?? EImageOutputType.PNG,
|
||||
paths,
|
||||
...endpointLocals,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue