better code: ?dl is supposed to be only in URL

Massimo Melina committed Apr 14, 2023 at 10:18 UTC 4eb5894713fb8f2895abe38963b562db65b6f49a
1 file changed +1 -1
src/serveFile.ts
+1 -1
@@ -40,7 +40,7 @@ export function serveFileNode(ctx: Koa.Context, node: VfsNode) {
40 }
41
42 ctx.vfsNode = node // useful to tell service files from files shared by the user
43 - if ('dl' in ctx.params) // please, download
43 + if ('dl' in ctx.query) // please, download
44 ctx.attachment(name)
45 return serveFile(ctx, source||'', mimeString)
46 }