fix: decode multer filename encoding for non-ASCII filenames

This commit is contained in:
ASTERISK Kwon
2026-03-30 20:31:04 +09:00
parent 6444b2b4ce
commit 9f1b0554d6
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -38,6 +38,7 @@ function getAllowedExtensions(): string {
const upload = multer({
storage,
limits: { fileSize: MAX_FILE_SIZE },
defParamCharset: 'utf8',
fileFilter: (_req, file, cb) => {
const ext = path.extname(file.originalname).toLowerCase();
if (BLOCKED_EXTENSIONS.includes(ext) || file.mimetype.includes('svg')) {