Ninja Pumpkin Mutants

    s3-helper-lib
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    Installation:

    yarn add s3-helper-lib

    or

    npm install s3-helper-lib

    Usage:

    const s3helper = new S3Helper({
         endpoint: "endpoint", //optional - AWS default
         accessKey: "access key", //Required
         secret: "secret", //Required
         bucket: "playbyplay", //Required
         region: "us-east-2" //Optional - AWS Default
         signatureVersion: "v2" //Optional - AWS Default
         sslEnabled: false // Default undefined for true
       });
    
    s3helper.exists("media/0000a880-3e24-11eb-9ccc-593e74bf0995.jpg", (exists) => {
      //exists = true | false
    });
    
    // key, localPath, callback
    s3helper.downloadToFilePath("media/0000a880-3e24-11eb-9ccc-593e74bf0995.jpg", "./spec/tmp/file.jpg", (err) => {
      //err = Error | null
    })
         
    // localPath, key, callback
    s3helper.uploadFromFilePath("./spec/tmp/file.jpg", "fileTest.jpg", (err) => {
      //err = Error | null
    });
    
    
    

    Keywords

    Install

    npm i s3-helper-lib

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    5.78 kB

    Total Files

    4

    Last publish

    Collaborators

    • smithos