storage-service
v0.1.19
Published
A promise based wrapper for S3.
Downloads
7
Readme
Storage Service
Summary
This module provides a Promise based S3 Storage wrapper. Simply pass in a S3Config object.
Example S3Config Object:
S3Config = {
key: 'S3-KEY',
secret: 'S3-SECRET'};
createCORSConfig: function CORSConfigGenerator(bucket) {
return {
Bucket: bucket,
CORSConfiguration: {
CORSRules: [{
AllowedHeaders: [
'*'
],
AllowedMethods: [
'GET',
'PUT',
'POST'
],
AllowedOrigins: [
'*'
],
MaxAgeSeconds: 3000
}]
}
}
};
Installation
Ensure you have access to the sinopia private npm registry, and then run the following command
$ npm install --save storage-service