The Express.js upload middleware that handles AWS S3, Azure, GCS, Cloudinary, FTP & SFTP — with validation, compression & TypeScript in one clean config object.
npm install upload-smith
Stop patching together five libraries. Upload Smith gives you a production-ready upload pipeline in minutes.
AWS S3, Azure Blob, Google Cloud Storage, Cloudinary, FTP, and SFTP — all from one unified API.
Whitelist exactly which file types are allowed per upload endpoint. Rejects everything else automatically.
Set different size caps for different file types — 5MB for images, 20MB for PDFs, 100MB for video.
Built-in Sharp integration compresses JPEG, PNG, WebP on the fly before uploading to cloud or disk.
Download and process files directly from URLs. Supports domain whitelisting and blacklisting for security.
Files are auto-deleted from both local disk and cloud storage when an error occurs. No orphaned files.
When uploading multiple files, save the valid ones and reject invalid ones — with per-file rejection reasons.
Complete type definitions included. Works seamlessly with both ESM and CommonJS projects.
Organize uploads by extension, by category, or both. Keeps your storage clean and structured automatically.
Switch providers by changing a single string. Your application code stays identical.
Replace your entire cloud upload boilerplate with a single createUploader() call.
uploader.single() or uploader.multiple() as middleware
req.file.cloudUrl — you're done ✓
Three storage strategies to match any architecture — dev, prod, or hybrid.
Files saved to disk. No cloud config needed. Perfect for development and simple apps.
no cloudStorage config
Files go straight to cloud. No disk usage. Ideal for production and serverless deployments.
keepLocalCopy: false
Uploads to cloud AND saves a local copy. Great for backups and migration periods.
keepLocalCopy: true
Multer is great — Upload Smith just removes the 200 lines you'd write around it.
| Capability | Raw Multer | upload-smith |
|---|---|---|
| AWS S3 uploads | Manual SDK setup | ✓ Built-in |
| Azure Blob Storage | ✗ | ✓ Built-in |
| Google Cloud Storage | ✗ | ✓ Built-in |
| Cloudinary | ✗ | ✓ Built-in |
| FTP / SFTP | ✗ | ✓ Built-in |
| Extension validation | Manual fileFilter | ✓ Config option |
| Per-extension size limits | ✗ | ✓ Config option |
| Image compression | ✗ | ✓ Via Sharp |
| URL download support | ✗ | ✓ Built-in |
| Auto cleanup on error | ✗ | ✓ Default on |
| Partial multi-file uploads | ✗ | ✓ Config option |
| TypeScript definitions | @types/multer | ✓ Full types included |
Your next upload feature starts here.