title: ReadFile in Base64 Nodejs
body: <p>I'm trying to read an image from client side encoded in base64.
  How to read with nodejs?</p>
  
  <p>My code:</p>
  
  <pre><code>// add to buffer base64 image
  var encondedImage = new Buffer(image.name, 'base64');
  
  fs.readFile(encondedImage, "base64", function(err, buffer){
      if ( err ) {
          console.log('In read file')
          console.log(err)
      } else {
          // check err
          lwip.open(buffer, 'jpg', function(err, image){
              console.log('in open')
              if ( err ) console.log(err)
  
              if ( image ) console.log(image)
              // check 'err'. use 'image'.
              // image.resize(...), etc.
          });
      }
  })
  </code></pre>
  
  <p>But, I got this error:</p>
  
  <pre><code>In read file
  [Error: Path must be a string without null bytes.]
  </code></pre>