Skip to content

Instantly share code, notes, and snippets.

@abishekrsrikaanth
Forked from chetandhembre/s3Uploader.js
Created April 16, 2014 06:07
Show Gist options
  • Save abishekrsrikaanth/10814560 to your computer and use it in GitHub Desktop.
Save abishekrsrikaanth/10814560 to your computer and use it in GitHub Desktop.
var Intimidate = require('intimidate');
var s3Uploader = function(options) {
try {
this.client = new Intimidate(options);
} catch (e) {
return null;
}
};
s3Uploader.prototype.uploadBuffer = function(buffer, headers, destination, callback) {
this.client.uploadBuffer(buffer, headers, destination, function(err, res, timesRetried) {
console.log(response.result); //returns url of uploaded file
callback(err, res, timesRetried);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment