recordio-s3
A node-task RecordIO interface for Amazon S3
API
read(path, options)
Read a file from Amazon S3 and return a promise which resolves to a node-task Record representing it.
The options
object supports these keys:
client
A knox S3 client (required).encoding
The encoding of the file to be read.
var recordio = ;var options = client:
write(record, options)
Save a node-task record to Amazon S3.
The options
object supports these keys:
client
A knox S3 client (required).headers
Set headers for uploaded file (far-future, etc).acl
A valid Canned ACL. Defaults to 'private'. Can also bepublic-read
,public-write
,public-read-write
,authenticated-read
. This is a convenience option for setting thex-amz-acl
header.
var Record = ;var recordio = ;var options = client:
Running Tests
To run the test suite you must first have an S3 account. Then create a file named ./test/s3.json, which contains your credentials and test bucket in this format:
"key": "<api-key-here>" "secret": "<secret-here>" "bucket": "<your-bucket-name>"