I'm using an ExpressJS (based on Node.js) to push up to Amazon S3. I'm new to this so, I copied the example Amazon gave, and I see that in the S3 Management Console, there's an extra file that's the same name as the bucket I'm creating. What part of my code made this?
// Create a bucket using bound parameters and put something in it.
var s3bucket = new AWS.S3({params: {Bucket: 'test_bucket/sub_bucket'}});
s3bucket.createBucket(function() {
var data = {Key: 'result', Body: 'Hello!'};
s3bucket.putObject(data, function(err, data) {
if (err) {
console.log("Error uploading data: ", err);
} else {
res.writeHead(200, {'Content-Type':'text/plain'});
res.write("Successfully uploaded data to test_bucket/sub_bucket/");
res.end()
}
});
});