Q:

How to use Url as parameter res.download() from expressjs

I found a example from expressjs:
res.download('/report-12345.pdf');
to prompt the user for download. But i pass a url as parameter. It not working.

A:

res.download just accepts path to filesystem in local.
For your requirement you can do one of below: 
1) use res.redirect({URL})
2) get that file from URL and then send file to client like :
app.get('/', function(req, res){  
http.get(URL, function(file) {
  file.pipe(res);
});
});

