Skip to content

Commit

Permalink
🐞 fix: Handle Garbled Chinese Characters in File Upload (danny-avila#…
Browse files Browse the repository at this point in the history
…2261)

Co-authored-by: 彭修照 <pengxiuzhao.uh@haier.com>
  • Loading branch information
pxz2016 and 彭修照 committed Apr 1, 2024
1 parent 90ab105 commit c0bf2ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/routes/files/multer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
},
});
Expand Down

0 comments on commit c0bf2ea

Please sign in to comment.