1.0.7 • Published 6 years ago

@focaccia/aws-adapter v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Focaccia AWS Adapter

This is an AWS s3 adapter for focaccia filesystem abstraction layer.

Installation

Execute npm install --save @focaccia/aws-adapter into your main repo.

How to use.

Uploading a file using AWS adapter

const AWS = require('aws-sdk');
const {AwsS3Adapter} = require("@focaccia/aws-adapter");
const {Focaccia} = require("@focaccia/focaccia");

AWS.config.update({
  accessKeyId: 'something',
  secretAccessKey: 'something',
});

var s3 = new AWS.S3();

let tAsty = new Focaccia(new AwsS3Adapter(s3, 'newBucket'), {});

// This will upload a file
let res = tAsty.write("helloworld.txt", "Hello Amazon world");

// Return a promise
res.then((d) => {
   console.log("RESULT", d);
})

For more docs and reference please visit https://github.com/Focaccia/Focaccia

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago