Skip to content

Instantly share code, notes, and snippets.

@bchatelard
Created August 17, 2015 15:18
Show Gist options
  • Save bchatelard/e30e87693e1457a13ed9 to your computer and use it in GitHub Desktop.
Save bchatelard/e30e87693e1457a13ed9 to your computer and use it in GitHub Desktop.
online.net SIS using aws node sdk
{ "accessKeyId": "<access_key>", "secretAccessKey": "<secret_key>", "endpoint": "fr-1.storage.online.net" }
var AWS = require('aws-sdk');
AWS.config.loadFromPath('./config.json');
var s3 = new AWS.S3();
var s3 = new AWS.S3({params: {Bucket: 'wip42'}});
s3.createBucket(function() {
var params = {Key: 'myKey2', Body: 'Hello!'};
s3.upload(params, function(err, data) {
if (err) {
console.log("Error uploading data: ", err);
} else {
console.log("Successfully uploaded data to myBucket/myKey");
}
});
});
console.log(s3.config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment