1.1.4 • Published 3 years ago

upload-groots v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago