Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 857 Bytes

README.md

File metadata and controls

41 lines (32 loc) · 857 Bytes

s3

Build Status Coverage Status

A package to handle the S3 requests

Installation

npm install @janiscommerce/s3

Methods

The methods that can be used are:

  • getObject
  • putObject
  • deleteObject
  • listObjects
  • listBuckets
  • createBucket
  • deleteBucket

Usage

const S3 = require('@janiscommerce/s3');

const putObjectParams = {
	Body: 'body',
	Bucket: 'bucketName',
	Key: `objectKey`
};

const s3Response = S3.putObject(putObjectParams);

return s3Response.then(response => {
	// do some stuf with the success
}).cath(err => {
	// do some stuf with the error
})