s3-sdk-lite
v1.0.1
Published
Single line code to upload/get files from S3-Bucket AWS in a simple and easy way.
Downloads
13
Maintainers
Readme
s3-sdk-lite
Single line code to upload/get files from AWS S3-Bucket in a simple and easy way.
Configure .env with below keys
bucketName = bucketName
accessKeyId = accessKeyId
secretAccessKey = secretAccessKey
region = region
Require module
const s3 = require("s3-sdk-lite");
Functions calls
Get Files in specific folder or objectkey
(async () => {
console.log(await s3.getFiles('videos/129/'));
})()
File upload using base64 string
(async () => {
console.log(await s3.fileUploadViaBase64("videos/129/abc.jpg",base64String));
})()
Video upload using base64 string
(async () => {
console.log(await s3.videoUploadViaBase64("videos/129/abc.mp3",base64String));
})()
Multipart image upload
(async () => {
console.log(await s3.multipartFileUpload("videos/129/abc.jpg",buffer));
})()
Delete specific file
(async () => {
console.log(await s3.deleteKey("videos/129/abc.jpg"));
})()
Developer
Sahil Aslam Kalaigar
contact :- [email protected]