As i saw in some threads, i may download a file that way:
$('.download').click(function(){
     window.location.href = 'images/apple_juice.jpeg';
});
But instead i am getting a page presenting this image.
As i saw in some threads, i may download a file that way:
$('.download').click(function(){
     window.location.href = 'images/apple_juice.jpeg';
});
But instead i am getting a page presenting this image.
 
    
    For future reference, i have managed download using node.js:
backup.get('/download-backup-file&:file_name', function(req, res){
    var file_name = req.params.file_name.split('=')[1];
    var file = 'backups/'+file_name;
    res.download(file); // Set disposition and send it.
});
