0.0.1 • Published 3 years ago

egg-minio-ts v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

egg-minio-ts

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-minio-ts --save

Usage

// {app_root}/config/plugin.js
exports.minio = {
  enable: true,
  package: 'egg-minio-ts',
};

Configuration

Database

see config/config.default.ts for more detail.

// {app_root}/config/config.default.ts
exports.minio = {
  // For Minio Server (Recommended offline profile.)
  ...
};

Example

  • Service
    ...
    const fileInfo = await this.app.minio.upload(fileStream);
    // @ts-ignore
    const url = await this.app.minio.getUrl(fileId);
    // @ts-ignore
    await this.app.minio.delete(fileId);
    // @ts-ignore
    const fileStream = await this.app.minio.download(fileId);
    ...

Reference

see minio-js for more detail.
see javascript-client-api-reference for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT