1.0.4 • Published 5 months ago

s3-easy-uploader v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

s3-easy-uploader

Effortlessly upload files to AWS S3 with s3-easy-uploader—a lightweight middleware built on Multer. No complex configurations, just plug and play with your S3 credentials and start uploading!

Features

  • Simple and easy-to-use file upload middleware
  • Automatically handles file storage and naming
  • Built-in support for AWS S3
  • Works seamlessly with Express and Multer

Installation

npm install s3-easy-uploader

Usage

const express = require("express");
const multer = require("multer");
const createS3Uploader = require("s3-easy-uploader");

const app = express();

// Configure the uploader
const upload = createS3Uploader({
  accessKey: "your-access-key",
  secretKey: "your-secret-key",
  bucketName: "your-bucket-name",
  region: "your-region"
});

// Set up the route
app.post("/upload", upload.single("file"), (req, res) => {
  res.json({ message: "File uploaded successfully", file: req.file });
});

app.listen(3000, () => console.log("Server running on port 3000"));

Configuration Parameters

ParameterDescription
accessKeyAWS Access Key
secretKeyAWS Secret Key
bucketNameName of the S3 bucket
regionAWS region

License

This project is licensed under the MIT License.

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago