mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🔒 feat: Implement Granular File Storage Strategies and Access Control Middleware
This commit is contained in:
parent
74e029e78f
commit
ff54cbffd9
13 changed files with 269 additions and 210 deletions
|
|
@ -270,8 +270,12 @@ const getStrategyFunctions = (fileSource) => {
|
|||
return azureMistralOCRStrategy();
|
||||
} else if (fileSource === FileSources.vertexai_mistral_ocr) {
|
||||
return vertexMistralOCRStrategy();
|
||||
} else if (fileSource === FileSources.text) {
|
||||
return localStrategy(); // Text files use local strategy
|
||||
} else {
|
||||
throw new Error('Invalid file source');
|
||||
throw new Error(
|
||||
`Invalid file source: ${fileSource}. Available sources: ${Object.values(FileSources).join(', ')}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue