title: Can't upload images in nodejs using aws-sdk
body: <p>I've tried using aws-sdk and knox and I get status code 301 trying to upload images. I get status code 301 and message - 'The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. This works in php.</p>
  
  <pre><code>AWS.config.loadFromPath(__dirname + '/config/config.json');
  fs.readFile(source, function (err, data) {
  var s3 = new AWS.S3();
      s3.client.createBucket({Bucket: 'mystuff'}, function() {
         var d = {
              Bucket: 'mystuff',
              Key: 'img/test.jpg',
              Body: data,
              ACL: 'public-read'
              };
         s3.client.putObject(d, function(err, res) {
              if (err) {
                  console.log("Error uploading data: ", err);
                  callback(err); 
              } else {
                  console.log("Successfully uploaded data to myBucket/myKey");
                  callback(res);   
              }
          });
      });
  }); 
  </code></pre>