1.0.2 • Published 2 years ago
@solvethex/aws-s3 v1.0.2
Uses the aws-sdk library to upload & download files from a bucket.
import awsS3 from 's3-services'
const { downloadS3Service, uploadS3Service } = awsS3({
region: '<aws-region>',
accessKeyId: '<aws-accessKeyId>',
secretAccessKey: '<aws-secretAccessKey>',
})
await downloadS3Service.download(key, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })
await uploadS3Service.uploadFiles(files, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })
await uploadS3Service.uploadBuffer(buffer, key, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })
1.0.2
2 years ago