title: Circuit SDK File Upload Example not working on node 8
body: <p>I am currently playing with the file upload functionality. </p>
  
  <p>Using the example from: <a href="https://github.com/circuit/node-sdk-example/blob/master/index.js" rel="nofollow noreferrer">https://github.com/circuit/node-sdk-example/blob/master/index.js</a> </p>
  
  <pre><code>var FileAPI = require('file-api');
  var File = FileAPI.File;
  
  //*********************************************************************
  //* getFiles -- helper
  //*********************************************************************
  this.getFiles = function(path) {
      var files = [];
      var fileNames = fs.readdirSync(path);
      fileNames.forEach(function (element) {
          var file = new File(path + element);
          files.push(file);
      });
      logger.debug('[APP]: getFiles' + files);
      return files;
  };
  
  
  //*********************************************************************
  //* Circuit - Post Logs
  //*********************************************************************
  this.postLog = function () {
      logger.info('[APP]: Log Message will be posted');
  
      //Get post content from File
      var text = fs.readFileSync(config.log_message,'utf8')
      logger.info('[APP]: Log Message extracted :', text);
  
      //Get files from folder
      var files = self.getFiles(config.log_folder);
  
      var message = {
          content: text,
          attachments: [files]
      };
      return client.addTextItem(config.conversationID, message);
  };
  </code></pre>
  
  <p>Could it be that it is not supported in the latest Node version?</p>
  
  <p>I get the following error message:</p>
  
  <pre><code>TypeError: mime.lookup is not a function\n    
  at new File (/GIT/logToCircuit/node_modules/File/File.js:37:35)\n    
  at /GIT/logToCircuit/app.js:109:24\n    
  at Array.forEach (native)\n    
  at LogToCircuit.getFiles (/GIT/logToCircuit/app.js:108:19)\n    
  at LogToCircuit.postLog (/GIT/logToCircuit/app.js:128:26)\n    
  at /GIT/logToCircuit/app.js:84:18\n    
  at /GIT/logToCircuit/node_modules/circuit-sdk/circuit.js:18119:25\n    
  at Array.forEach (native)\n    
  at BaseEventTarget.dispatch (/GIT/logToCircuit/node_modules/circuit-sdk/circuit.js:18117:34)\n    
  at /GIT/logToCircuit/node_modules/circuit-sdk/circuit.js:49132:27","time":"2018-06-24T11:52:28.631Z","v":0}
  </code></pre>