mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🐞 fix: Handle Garbled Chinese Characters in File Upload (#2261)
Co-authored-by: 彭修照 <pengxiuzhao.uh@haier.com>
This commit is contained in:
parent
4854b39f41
commit
cc92597f14
2 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ const storage = multer.diskStorage({
|
|||
},
|
||||
filename: function (req, file, cb) {
|
||||
req.file_id = crypto.randomUUID();
|
||||
file.originalname = decodeURIComponent(file.originalname);
|
||||
cb(null, `${file.originalname}`);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue