mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 19:30:15 +01:00
refactor: remove getCustomConfig dependency and use getAppConfig in PluginController, multer, and MCP services
This commit is contained in:
parent
e0980e796a
commit
b0256510b5
3 changed files with 10 additions and 11 deletions
|
|
@ -4,7 +4,7 @@ const crypto = require('crypto');
|
|||
const multer = require('multer');
|
||||
const { sanitizeFilename } = require('@librechat/api');
|
||||
const { fileConfig: defaultFileConfig, mergeFileConfig } = require('librechat-data-provider');
|
||||
const { getCustomConfig, getAppConfig } = require('~/server/services/Config');
|
||||
const { getAppConfig } = require('~/server/services/Config');
|
||||
|
||||
const storage = multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
|
|
@ -74,8 +74,8 @@ const createFileFilter = (customFileConfig) => {
|
|||
};
|
||||
|
||||
const createMulterInstance = async () => {
|
||||
const customConfig = await getCustomConfig();
|
||||
const fileConfig = mergeFileConfig(customConfig?.fileConfig);
|
||||
const appConfig = await getAppConfig();
|
||||
const fileConfig = mergeFileConfig(appConfig?.fileConfig);
|
||||
const fileFilter = createFileFilter(fileConfig);
|
||||
return multer({
|
||||
storage,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue