title: Uploading a buffer to google cloud storage
body: <p>I'm trying to save a Buffer (of a file uploaded from a form) to Google Cloud storage, but it seems like the Google Node SDK only allows files with a given path to be uploaded (Read / Write streams).</p>
  
  <p>This is what I have used for AWS (S3) - is the anything else similar in the Google node SDK?:</p>
  
  <pre><code>var fileContents = new Buffer('buffer');
  
  var params = {
    Bucket: //bucket name
    Key: //file name
    ContentType: // Set mimetype
    Body: fileContents 
  };
  
  s3.putObject(params, function(err, data) {
  // Do something 
  });
  </code></pre>
  
  <p>The only way that I have found to do it so far is write the buffer to disk, upload the file using the SDK (specifying the path to the new file) and then delete the file once it's uploaded successfully - the downside to this is that the whole process is <strong>significantly</strong> slower, to where it seems to be unfeasible to use Google storage. Is there any work around / way to upload a buffer? </p>