mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-19 16:28:42 +00:00
Compare commits
2 Commits
v1.10.1
...
a3283ff3bb
Author | SHA1 | Date | |
---|---|---|---|
a3283ff3bb | |||
4134770586 |
@ -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;
|
||||
|
Reference in New Issue
Block a user