Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/codebrewlab/nestjs-storage
- Owner: codebrewlab
- Created: 2020-07-22T04:43:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-22T08:46:05.000Z (about 2 years ago)
- Last Synced: 2024-04-24T19:49:19.747Z (7 months ago)
- Topics: driver, filesystem, flydrive, google-cloud-storage, nestjs, nodejs, s3, storage, typescript
- Language: TypeScript
- Homepage:
- Size: 187 KB
- Stars: 115
- Watchers: 3
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
nestjs-storage is manage file Storage wrapping package flydrive
## 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.