title: React.js - download a file from signed S3 url on onclick() event
body: <p>I have a signed Amazon S3 URL which points to a PDF file in a bucket</p>
  
  <p>I want to download this file, not redirect/display it when a button is clicked.</p>
  
  <p>I had figured something like this</p>
  
  <pre><code>Router.route('download', {
    path: '/d/:signedURL',
    onAfterAction: function() {
      var req = this.request;
      var res = this.response;
  
      res.setHeader('Content-disposition', 'attachment; filename=' + this.params.signedURL);
  
      console.log(req, res);
  
  
    }
  }, {where: 'server'});
  </code></pre>
  
  <p>But can't get it to work, any advice?</p>
  
  <p>EDIT:</p>
  
  <pre><code>Request URL:chrome-extension://invalid/
  Request Headers
  Provisional headers are shown
  Referer:http://localhost:3000/d/https%3A/s3.amazonaws.com/tabler-development/08867c4b0guX7REeBvLHdLaMM%253D
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36
  X-DevTools-Request-Initiator:frontend
  </code></pre>