s3-service
v1.0.6
Published
A service for uploading files to AWS S3 using NestJS and AWS SDK.
Downloads
20
Readme
S3 Service Package
A NestJS package for interacting with AWS S3 with dynamic configuration.
Installation
npm install s3-service-package
Usage
1. Update module
imports: [
S3Module.forRoot({
secretId: 'your-secret-id',//Secret store name in secretmanager
bucketName: 'your-bucket-name',
region: 'your-region',
}),
],
2. Update Controller
constructor(private readonly s3Service: S3Service) {}
3. Call uploadfile method
const fileUrl = await this.s3Service.uploadFile(file, folder);