@codebrew/nestjs-storage
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Nest Logo

nestjs-storage is manage file Storage wrapping package flydrive

NPM Version Package License NPM Downloads

Installation

$ npm i --save @codebrew/nestjs-storage @slynova/flydrive

# optional with s3 driver
$ npm i --save @slynova/flydrive-s3

# optional with gcs driver
$ npm i --save @slynova/flydrive-gcs

Example

// app.module.ts
import { Module } from '@nestjs/common'
import { StorageModule, DriverType, StorageService } from '@codebrew/nestjs-storage';

@Module({
  imports: [
    StorageModule.forRoot({
      default: 'local',
      disks: {
        local: {
          driver: DriverType.LOCAL,
          config: {
            root: process.cwd(),
          },
        },
      },
    }),
  ],
})
export class AppModule {
  constructor(private storage: StorageService) {
    this.storage.getDisk().put('test.txt', 'text content');
  }
}

Support

nestjs-storage is an MIT-licensed open source project. If this library is helpful, please click star to support it.

Stay in touch

License

nestjs-storage is MIT licensed.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.71,866latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.71,866
0.1.630
0.1.50
0.1.416
0.1.30
0.1.20
0.1.10

Package Sidebar

Install

npm i @codebrew/nestjs-storage

Weekly Downloads

1,912

Version

0.1.7

License

MIT

Unpacked Size

22.1 kB

Total Files

41

Last publish

Collaborators

  • tienne