diff --git a/src/controllers/flows.controllers.ts b/src/controllers/flows.controllers.ts index 52d2a7c..25445c8 100644 --- a/src/controllers/flows.controllers.ts +++ b/src/controllers/flows.controllers.ts @@ -91,7 +91,7 @@ export async function downloadNotebookVSC2(req: Request, res: Response, next: Ne const file = Buffer.from(template); res.setHeader('Content-Length', file.length); - res.setHeader('Content-Disposition', `attachment; filename=notebook-${req.params.id}.dib`); + res.setHeader('Content-Disposition', `attachment; filename=${req.params.filename}`); res.write(file, 'binary'); res.end(); } diff --git a/src/routes/flows.routes.ts b/src/routes/flows.routes.ts index dc19a59..a485a66 100644 --- a/src/routes/flows.routes.ts +++ b/src/routes/flows.routes.ts @@ -25,7 +25,7 @@ router.route("/:id/runFirst") //first version of the notebook (run the executi router.route("/:ctxId/run") // version of notebook with only ctx information .get(FlowController.downloadNotebookVSCCTX); -router.route("/:id/:ctxId/run") //2nd version of notebook with ctx information and flowId +router.route("/:id/:ctxId/run/:filename") //2nd version of notebook with ctx information and flowId .get(FlowController.downloadNotebookVSC2); router.route("/:id/publish") //function to publish the flow