mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🧑💻 fix: Agents Config Defaults and Avatar Uploads Across File Strategies (#7814)
* fix: avatar processing across storage services, uniqueness by agent ID, prevent overwriting user avatar * fix: sanitize file paths in deleteLocalFile function to prevent invalid path errors * fix: correct spelling of 'agentsEndpointSchema' in agents.js and config.ts * fix: default app.locals agents configuration setup and add agent endpoint schema default
This commit is contained in:
parent
118ad943c9
commit
a57224c1d5
13 changed files with 192 additions and 55 deletions
|
|
@ -31,7 +31,7 @@ const handleExistingUser = async (oldUser, avatarUrl) => {
|
|||
input: avatarUrl,
|
||||
});
|
||||
const { processAvatar } = getStrategyFunctions(fileStrategy);
|
||||
updatedAvatar = await processAvatar({ buffer: resizedBuffer, userId });
|
||||
updatedAvatar = await processAvatar({ buffer: resizedBuffer, userId, manual: 'false' });
|
||||
}
|
||||
|
||||
if (updatedAvatar) {
|
||||
|
|
@ -90,7 +90,11 @@ const createSocialUser = async ({
|
|||
input: avatarUrl,
|
||||
});
|
||||
const { processAvatar } = getStrategyFunctions(fileStrategy);
|
||||
const avatar = await processAvatar({ buffer: resizedBuffer, userId: newUserId });
|
||||
const avatar = await processAvatar({
|
||||
buffer: resizedBuffer,
|
||||
userId: newUserId,
|
||||
manual: 'false',
|
||||
});
|
||||
await updateUser(newUserId, { avatar });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue