v2.1.0 — now with FTP & SFTP support

File uploads.
Done right.

Make Uploads Effortless.

The Express.js upload middleware that handles AWS S3, Azure, GCS, Cloudinary, FTP & SFTP — with validation, compression & TypeScript in one clean config object.

MIT LicenseTypeScript ReadyESM + CJSBuilt on Multer
npm install upload-smith
6+

Cloud Providers

1

Config Object

0%

Boilerplate

File Types


Core Features

Everything you need.
Nothing you don't.

Stop patching together five libraries. Upload Smith gives you a production-ready upload pipeline in minutes.

6 Cloud Providers

AWS S3, Azure Blob, Google Cloud Storage, Cloudinary, FTP, and SFTP — all from one unified API.

Extension Validation

Whitelist exactly which file types are allowed per upload endpoint. Rejects everything else automatically.

Per-Extension Size Limits

Set different size caps for different file types — 5MB for images, 20MB for PDFs, 100MB for video.

Image Compression

Built-in Sharp integration compresses JPEG, PNG, WebP on the fly before uploading to cloud or disk.

URL Import

Download and process files directly from URLs. Supports domain whitelisting and blacklisting for security.

TypeScript Ready

First-class TypeScript support with full type inference for your config and return values.


Providers

One package.
Every cloud.

Switch providers by changing a single string. Your application code stays identical.

AWS S3
Azure Blob
Google Cloud Storage
Cloudinary
SFTP
FTP
Local Disk

Implementation

Go from zero to cloud
in 5 lines of code.

Single unified configuration object
Middleware handles multipart/form-data seamlessly
Automatic cleanup of local temporary files
Supports single, multiple, or complex field uploads
Read Documentation
1import { createUploader } from "upload-smith";
2
3const upload = createUploader({
4 fieldName: "file",
5 allowedExtensions: ["jpg", "png", "pdf"],
6 cloudStorage: {
7 enabled: true,
8 provider: "aws",
9 aws: {
10 region: process.env.AWS_REGION,
11 bucket: process.env.AWS_BUCKET,
12 accessKeyId: process.env.AWS_KEY,
13 secretAccessKey: process.env.AWS_SECRET
14 },
15 keepLocalCopy: false
16 }
17});
18
19app.post("/upload", upload.single(), (req, res) => {
20 res.json({ url: req.file.publicUrl });
21});
AWS S3 Implementation

Storage Modes

Deploy anywhere.

Three storage strategies to match any architecture — dev, prod, or hybrid.

💾

Local Only

Files saved to disk. No cloud config needed. Perfect for development and simple apps.

no cloudStorage config
RECOMMENDED
☁️

Cloud Only

Files go straight to cloud. No disk usage. Ideal for production and serverless deployments.

keepLocalCopy: false
🔄

Cloud + Local Copy

Uploads to cloud AND saves a local copy. Great for backups and migration periods.

keepLocalCopy: true

Why not just
use raw Multer?

Multer is great — Upload Smith just removes the 200 lines you'd write around it.

CapabilityRaw Multerupload-smith
AWS S3 uploadsManual SDK setup
Built-in
Azure Blob StorageX
Built-in
Google Cloud StorageX
Built-in
CloudinaryX
Built-in
FTP / SFTPX
Built-in
Extension validationManual fileFilter
Config option
Per-extension size limitsX
Config option
Image compressionX
Via Sharp
URL download supportX
Built-in

Get Started

One install.
Ship everything.

Your next upload feature starts here.