title: Cloudinary Integration using Node.js
body: <p>I'm trying to integrate Cloudinary in my project for uploading images. I have just started using the following links:</p>
  
  <p><a href="http://cloudinary.com/documentation/node_image_upload" rel="nofollow noreferrer">http://cloudinary.com/documentation/node_image_upload</a>
  <a href="https://github.com/cloudinary/cloudinary_npm/blob/master/samples/basic/basic.js" rel="nofollow noreferrer">https://github.com/cloudinary/cloudinary_npm/blob/master/samples/basic/basic.js</a></p>
  
  <p>I'm stuck at a point where I can see the image uploaded to Cloudinary in my dashboard but in my code the response is undefined.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>cloudinary.config(config.cloudinaryConfig);
  function uploadFileInCloudinary(fileObj, callback) {
      console.log(fileObj);
      if(fileObj &amp;&amp; (fileObj != undefined)) {
          console.log(fileObj['path']);
          cloudinary.uploader.upload(fileObj['path'], function(err, result) {
              if(err) {
                  callback(err);
              }
              console.log("cloudinary result");
              console.log(JSON.stringify(result));  // undefined
              callback(null, result);
          });
      } else {
          callback("error");
      }
  }
  </code></pre>
  
  <p>Why is it so? Can anyone give me some pointers to where am I doing wrong?</p>