file-storing
v0.0.4
Published
A library for integration with AWS S3
Readme
File-storing
DISCLAIMER: This is a work in progress, and is not production ready.
Changes
- upload function now also returns a succes bool, which can be used to check if upload was succesfull.
- better code completion for upload response.
A library for interacting with and creating AWS S3 buckets.
Getting started
- install package from npm
npm install file-storingcreate an IAM user with full access to S3,
create an access key for the previously created user. Save the secret key in a secure place.
instantiate a new client:
const client = new Client({
region: "eu-central-1", // multiple regions available
credentials: {
accessKeyId: "KEYID",
secretAccessKey: "SECRET_KEY",
},
});- use the client to:
client.createBucket(
...
);
client.deleteBucket(
...
);
client.upload(
...
);
client.download(
...
);
client.delete(
...
);