From 2c57d2045c666dc7a3a3a4b6bf8d7baebfee45f5 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Mon, 10 Aug 2020 17:10:57 +0200 Subject: [PATCH] csv fix --- src/routes/sample.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/sample.ts b/src/routes/sample.ts index 8a82071..e50ceac 100644 --- a/src/routes/sample.ts +++ b/src/routes/sample.ts @@ -400,6 +400,7 @@ router.get('/samples', async (req, res, next) => { csv(_.compact(data.map(e => SampleValidate.output(e, 'refs', measurementFields))), (err, data) => { if (err) return next(err); res.set('Content-Type', 'text/csv'); + res.set('Content-Disposition', 'attachment; filename="samples.csv"'); res.send(data); }); }