Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codebrewlab/nestjs-storage

Nestjs file system / file storage module wrapping flydrive
https://github.com/codebrewlab/nestjs-storage

driver filesystem flydrive google-cloud-storage nestjs nodejs s3 storage typescript

Last synced: 1 day ago
JSON representation

Nestjs file system / file storage module wrapping flydrive

Awesome Lists containing this project

README

        


Nest Logo


nestjs-storage is manage file Storage wrapping package flydrive



NPM Version
Package License
NPM Downloads

## Installation

```bash
$ 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

```typescript
// 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

- Author - [David Kwon](https://github.com/tienne)

## License

nestjs-storage is MIT licensed.