fix(plugin-import): sheet name cannot contain : \ / ? * [ ]
This commit is contained in:
parent
a6fc04503d
commit
708675deb9
@ -14,7 +14,7 @@ export async function downloadXlsxTemplate(ctx: Context, next: Next) {
|
||||
|
||||
ctx.body = xlsx.build([
|
||||
{
|
||||
name: title,
|
||||
name: 'Sheet 1',
|
||||
data,
|
||||
options: {},
|
||||
},
|
||||
@ -23,7 +23,7 @@ export async function downloadXlsxTemplate(ctx: Context, next: Next) {
|
||||
ctx.set({
|
||||
'Content-Type': 'application/octet-stream',
|
||||
// to avoid "invalid character" error in header (RFC)
|
||||
'Content-Disposition': `attachment; filename=${encodeURI(title)}.xlsx`,
|
||||
'Content-Disposition': `attachment; filename=${encodeURIComponent(title)}.xlsx`,
|
||||
});
|
||||
|
||||
await next();
|
||||
|
Loading…
Reference in New Issue
Block a user