nest-storage
nest-storage copied to clipboard
Use s3 driver basePath if configured
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