1.2.11 • Published 12 months ago

@astram/node-helper v1.2.11

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

Astram Node Helper

All Common Helper Functions will be used using this library

Installation

Install node-helper using npm

$ cd <working_directory>
$ npm i @astram/node-helper

Helper Modules

S3 Module

This module is used to get all tasks related to S3 that includes following functionality

  • Upload Files
    • uploadToS3
      • Directly Upload File from local system/server to S3
    • uploadFromBuffer
      • Upload data/content to a file onto S3
    • uploadFromStream
      • Upload using stream
  • Get File
    • getAllFiles
      • Get all files of a folder
    • getFileLink
      • Get File as URL from S3 which is signed and will expires by default it is 5mins
    • downloadFromS3
      • Download File from S3 to local system or get content of file
  • Check File Existance
    • isFileExist
      • Check whether a file exists corresponding to a bucket or not
  • Delete File
    • deleteFile
      • Delete file from S3

Code Example

const { s3 } = require(`@astram/node-helper`);

const bucket = `astram-bucket`;

// check if file exists
const filePath = `test/test.pdf`;
const isFile = await s3.isFileExist(bucket, filePath);

// Get File Link
const filePath = `test/test.pdf`;
const isFile = await s3.getFileLink(bucket, filePath);

...
1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.9

1 year ago

1.2.10

12 months ago

1.2.11

12 months ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago