title: Converting streamed file content to base64 format
body: <p>I've file coming from gridFS of mongoDB as stream. I need to convert the content into base64 format. My code looks something like this : </p>
  
  <pre><code>utils.readFileFromDb('fileID', "collectionName",
        function(err, result) {
  var dbResult = result.pipe(base64.encode()));};
  </code></pre>
  
  <p>Here, I'm doing a mongoDB call and getting file based on file id from gridFS. The <strong>result</strong> of callback contains stream file content. I tried doing it using base64-stream module but getting result as object only.  </p>