10.3.20 • Published 7 months ago
@coara/nestjs-aws-s3-manager v10.3.20
Nestjs aws s3 manager
File manager module for NestJs.
Installation
Yarn
yarn add @coara/nestjs-aws-s3-managerNPM
npm install @coara/nestjs-aws-s3-manager --saveGetting Started
Let's register the FileManagerModule in app.module.ts
import { Module } from '@nestjs/common';
import { FileManagerModule } from '@coara/nestjs-aws-s3-manager';
@Module({
imports: [
FileManagerModule.forRoot({
awsAccessKeyId: '****',
awsSecretAccessKey: '****',
awsBucketName: 'my-bucket-name',
}),
],
})
export class AppModule {}With Async
import { Module } from '@nestjs/common';
import { FileManagerModule } from '@coara/nestjs-aws-s3-manager';
@Module({
imports: [
FileManagerModule.forRootAsync({
useFactory: (configService: ConfigService) => ({
awsAccessKeyId: configService.get('AWS_ACCESS_KEY_ID'),
awsSecretAccessKey: configService.get('AWS_SECRET_ACCESS_KEY'),
awsBucketName: 'my-bucket-name',
}),
inject: [ConfigService],
}),
],
})
export class AppModule {}API Endpoints
curl -F 'file=@path/to/local/file' http://localhost:3000/imagesThat's it!
10.3.14
7 months ago
10.3.16
7 months ago
10.3.15
7 months ago
10.3.18
7 months ago
10.3.17
7 months ago
10.3.19
7 months ago
10.3.20
7 months ago
10.3.9
1 year ago
10.3.13
1 year ago
10.3.10
1 year ago
10.3.12
1 year ago
10.3.11
1 year ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
0.0.0
6 years ago