Skip to content

Commit

Permalink
fix: modify url path to enable vscode download remote file
Browse files Browse the repository at this point in the history
  • Loading branch information
daviFrag committed May 18, 2024
1 parent e96d19e commit e0caf77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controllers/flows.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/flows.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0caf77

Please sign in to comment.