0.1.7 • Published 2 years ago

@codebrew/nestjs-storage v0.1.7

Weekly downloads
98
License
MIT
Repository
github
Last release
2 years ago

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.

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

3 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago