Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nest-cn/qiniu-sdk
A NestJS - qiniu, wrapping on qiniu
https://github.com/nest-cn/qiniu-sdk
file-upload nestjs node qiniu
Last synced: about 1 month ago
JSON representation
A NestJS - qiniu, wrapping on qiniu
- Host: GitHub
- URL: https://github.com/nest-cn/qiniu-sdk
- Owner: nest-cn
- Created: 2023-03-19T07:18:46.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T03:30:20.000Z (10 months ago)
- Last Synced: 2024-12-01T13:40:44.245Z (about 1 month ago)
- Topics: file-upload, nestjs, node, qiniu
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## NestJs qiniu sdk
### Description
A NestJS - qiniu, wrapping on [qiniu](https://developer.qiniu.com/kodo/sdk/nodejs)
### Installation
```bash
npm install nestjs-qiniu
```### Add it to the NestJS app.module.ts or any module
```ts
import { QiniuModule } from 'nestjs-qiniu';@Module({
imports: [
QiniuModule.register({
global: true,
access_key: 'access_key',
secret_key: 'secret_key',
bucket: 'bucket',
domain: 'http://bucket.test',
}),
],
controllers: [],
providers: [],
})
export class Module {}
```### How to use
```ts
import { QiniuService } from "nestjs-qiniu";@Injectable()
export class TestService{
constructor(@Inject(QiniuService) private readonly qiniuService: QiniuService) {}
public getQiniuConfig() {
return this.qiniuService.options;
}public updateQiniuConfig() {
this.qiniuService.updateOptions({
access_key: 'access_key',
secret_key: 'secret_key',
bucket: 'bucket',
domain: 'http://bucket.test',
//
});
}
}```