Answer the question
In order to leave comments, you need to log in
How to download file by name using express js?
There is a code:
app.get('/downloadJson', (req, res, next) => {
let path = './data/';
let fileName = 'name.json';
res.download(path, fileName);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question