refactor: buffer form attachment file name (#2429)
This commit is contained in:
parent
15504c2813
commit
e573d085d3
@ -32,7 +32,7 @@ function getFileData(ctx: Context) {
|
|||||||
const urlPath = storage.path ? storage.path.replace(/^([^/])/, '/$1') : '';
|
const urlPath = storage.path ? storage.path.replace(/^([^/])/, '/$1') : '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: file.originalname.replace(extname, ''),
|
title: Buffer.from(file.originalname, 'latin1').toString('utf8').replace(extname, ''),
|
||||||
filename,
|
filename,
|
||||||
extname,
|
extname,
|
||||||
// TODO(feature): 暂时两者相同,后面 storage.path 模版化以后,这里只是 file 实际的 path
|
// TODO(feature): 暂时两者相同,后面 storage.path 模版化以后,这里只是 file 实际的 path
|
||||||
|
Loading…
Reference in New Issue
Block a user