Closed tinchoz49 closed 11 years ago
Hi, you might want to consider migrating to Iron Router soon: https://github.com/eventedMind/meteor-iron-router/
In the meantime, you can do something like:
Meteor.Router.add({
'/image.jpeg': function(req, res) {
... do whatever
}
})
You'll need to put that in a server-side file.
I've never used res.download()
before--that may just work out of the box (?)
I want to create a download image function like this:
(express version)
app.get('/image.jpeg', function(req, res){ var file = __dirname + '/upload-folder/image.jpeg'; res.download(file); // Set disposition and send it. });
How i can make this using meteor-router?
Thanks, great package!!