1.1.4 • Published 2 years ago

upload-groots v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

upload groots

Follow this step to upload your file into cloud(AWS/GCP) using this npm package.

Installation

$ npm i upload-groots

Usage

AWS S3 bucket

If you upload your file into aws s3 bucket, follow this step:

import { fileStorageAws, fileStorageGcp } from 'upload-groots';

Inside your controller, process those variables

let file = req.file

  const credential = {
    accessKeyId,
    secretAccessKey,
    region,
    bucketName,
  };

GOOGLE CLOUD STORAGE

Then use those line of of CODE to upload file into google cloud storage

  //for upload your file
  await fileStorageAws.upload(credential, file);

  //for delete your file
  await fileStorageAws.delete(credential, file);

  //for getFile your file
  await fileStorageAws.getFile(fileName, bucketName);

AWS S3 BUCKET

Or use those line of of code to upload file into aws s3 bucket

  //for upload your file
  await fileStorageGcp.upload(credential, file);

  //for delete your file
  await fileStorageGcp.delete(credential, file);

  //for getFile your file
  await fileStorageGcp.getFile(fileName, bucketName);
1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago