title: I have a file that is encoded in RIFF. How can I send this file through an ajax post response?
body: <p>I am trying to preserve the RIFF encoding of the file while sending it back as a response, as shown below.</p>
  
  <pre><code>router.post('/someroute', function(req,res,next){
  
    var riff1= fs.readFileSync(somefilepath);            
    res.send(riff1);
  }
  </code></pre>
  
  <p>When I receive a response from my AJAX call, and examine the response it is in an ASCII format. I have tried to change the encoding of readFileSync to utf8, but that isn't working. How can I achieve this?</p>