node-esetres
Installation
npm install esetres
Usage
Usage is pretty straight forward
var fs = ;var s3 = bucket: "bucketname" key: "PUBLICKEY" secret: "SUPERSECRETKEY"; s3; s3; s3; // you can pass in custom headers as a second argument, and the callback thirds3; s3;
#### Methods ##### #put(stream || buffer, path, [headers, callback]) ###### Sends a PUT request to the specified path ##### #get(path, [headers, callback]) ###### Sends a GET request to the specified Object ##### #getBucket([headers, callback]) ###### Returns the contents of the current bucket ##### #head(path, [headers, callback]) ###### Sends a HEAD request to the specified Object ##### #generatePolicyFromObject(object) ###### A helper-function for direct-to-S3 uploads that generates the Base64 encoded version of the policy passed to it ##### #generateSignatureFromPolicyString(policy) ###### A helper-function for direct-to-S3 uploads that works together with the afforementioned function by generating the SHA1-HMAC Base64 encoded signature requred by the S3 API for direct post requests (refer here for more information on the purpose of thes functions)