nest-storage icon indicating copy to clipboard operation
nest-storage copied to clipboard

Use s3 driver basePath if configured

Open myckhel opened this issue 2 years ago • 0 comments

This pull request adds the ability to use basePath config for s3 when working with files.

Example Usage

{
  driver: 's3',
  bucket: process.env.AWS_S3_DOCS_BUCKET,
  key: process.env.AWS_KEY,
  secret: process.env.AWS_SECRET,
  region: process.env.AWS_REGION,
  basePath: 'pictures'
}

Storage.disk('products').put('picture.jpg', Buffer)

File will be stored at the location {BUCKET}/pictures/picture.jpg

myckhel avatar Mar 16 '22 14:03 myckhel