Compare commits

...

3 Commits

2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,7 @@ API_KEY = ""
[MODELS.CUSTOM_OPENAI]
API_KEY = ""
API_URL = ""
MODEL_NAME = ""
[MODELS.OLLAMA]
API_URL = "" # Ollama API URL - http://host.docker.internal:11434

View File

@ -75,6 +75,12 @@ router.post(
}
const files = req.files['files'] as Express.Multer.File[];
// Fixed the garbled issue of non-ASCII character filenames.
files.forEach((file) => {
file.originalname = Buffer.from(file.originalname, 'latin1').toString(
'utf8',
);
});
if (!files || files.length === 0) {
res.status(400).json({ message: 'No files uploaded' });
return;