Skip to content

Dectom/Basic-S3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic-S3

Basic S3 Is a project I have created to make the basic actions of using and interacting with S3 compatible APIs a lot easier

Installation

Installation is simple, Just run npm install basic-s3

Example Usage

const Storage = require("basic-s3");

const opts = {
  s3Options: {
    accessKeyId: "accessKeyId",
    secretAccessKey: "secretAccessKey",
    endpoint: "endpointUrlHere",
    region: "optionalRegionForEndpoint"
  },
  bucketName: "bucketName"
}

const S3 = new Storage(opts);

S3.getObject("Key");

Current Methods

Currently Implemented Methods

  • getObject(key)
  • listObjects()
  • uploadToS3(key, localFile)
  • deleteFromS3(key)

Additional Helper Functions

  • deleteLocalFile(localFilePath)

About

Basic Class to handle S3 API Calls

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published