I would like a landing page sent via email link and use same GET to attach a file download.
I would like to both render a Handlebar template using Express Static, and use same Req flow to download a file. I know requests cannot be set twice, so how can I get around this using one GET??? The download may take a few moments to prepare before downloading- so a landing page is need after user clicks the email link- but I need the request for the download file too.
Thanks in advance for any ideas you may have. Stuck on this one.
For example:
app.get('/download a file from email link', function (req, res, next) {
res.render('index') // replies w Template rendered Express...
Then after header is set, download a file after the header has been replied to in same GET:
res.attachment('file');
res.send(data for download);