title: Heroku file upload
body: <p>I have a local file download, which gets triggered in the following fashion.</p>
  
  <pre><code>panelBody.append('&lt;button onclick="downloadCsv(\''+skl+'\')"&gt;Download csv&lt;/button&gt;')
  
  function downloadCsv(data){
    var filename=data+'_report.csv'
    var form = $('&lt;form&gt;', {action: '/admin/download', method: 'GET'});
    form.append($('&lt;input&gt;', {name: 'file_name', value: filename}));
    form.submit();
    return false;
  }
  
  router.get('/download',helper.isSchoolAdmin,feedController.downloadCsv);
  
  downloadCsv:function(req,res){
    var fileName = process.cwd()+'/reports/'+ req.query.file_name;
    res.download(fileName,function(err){
      if(!err)console.log('down')
    });
  }
  </code></pre>
  
  <p>The file itself is written to the specified path in the immediate previous request to a different route. 
  Now this works fine on my local..My question is, what would happen once I deploy it onto heroku? would my file upload and download still work, as I've read that heroku uses an ephimeral file system which allows writing only to a tmp directory.</p>
  
  <p>If that's the case, could someone walk me through on how exactly to write to that directory through node...and also, would the file end up getting deleted before I could download it, since the upload and download are part of separate requests? Thanks.</p>