mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 07:41:13 +10:00
fix page export failure when title contains non-ASCII characters (#309)
This commit is contained in:
@ -182,7 +182,7 @@ export class AttachmentController {
|
||||
if (!inlineFileExtensions.includes(attachment.fileExt)) {
|
||||
res.header(
|
||||
'Content-Disposition',
|
||||
`attachment; filename="${attachment.fileName}"`,
|
||||
`attachment; filename="${encodeURIComponent(attachment.fileName)}"`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,8 @@ export class ImportController {
|
||||
|
||||
res.headers({
|
||||
'Content-Type': getMimeType(fileExt),
|
||||
'Content-Disposition': 'attachment; filename="' + fileName + '"',
|
||||
'Content-Disposition':
|
||||
'attachment; filename="' + encodeURIComponent(fileName) + '"',
|
||||
});
|
||||
|
||||
res.send(rawContent);
|
||||
|
||||
Reference in New Issue
Block a user