-
-
Save abishekrsrikaanth/10814560 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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