keep parens in filename

This commit is contained in:
daniel-j
2023-12-06 21:13:38 +01:00
parent 35ef23ef11
commit 528d304e0d

View File

@@ -166,7 +166,7 @@ router.get('/download/:key', async ctx => {
}
expireKey(key)
// const fallback = basename(info.file.path)
const sanename = info.file.name.replace(/[^\.\w\-"']/g, '_')
const sanename = info.file.name.replace(/[^\.\w\-"'\(\)]/g, '_')
console.log('Sending file', [info.file.path, info.file.name, sanename])
await sendfile(ctx, info.file.path)
if (info.agent.includes('Kindle')) {