fix: Unsure filename when downloading an untitled document

fix: Unsure unique filename when downloading revision
This commit is contained in:
Tom Moor
2022-09-11 14:32:38 +01:00
parent 0fd576cdd5
commit c89567991b
3 changed files with 10 additions and 4 deletions

View File

@@ -472,9 +472,9 @@ router.post(
ctx.set("Content-Type", contentType);
ctx.set(
"Content-Disposition",
`attachment; filename="${slugify(document.title)}.${mime.extension(
contentType
)}"`
`attachment; filename="${slugify(
document.titleWithDefault
)}.${mime.extension(contentType)}"`
);
ctx.body = content;
return;