v2.0 Released

File uploads,
done right.

Zero-dependency, stream-first file upload handler for Node.js. Plugin-based architecture for unlimited flexibility.

Zero dependencies
O(1) memory
TypeScript ready
server.js
const FluxUpload = require('fluxupload');

const uploader = new FluxUpload({
  storage: 'local',
  destination: './uploads',
  limits: { fileSize: 50 * 1024 * 1024 }
});

app.post('/upload', async (req, res) => {
  const result = await uploader.handle(req);
  res.json({ files: result.files });
});

Why FluxUpload?

Built for modern Node.js applications with performance and security in mind.

Zero Dependencies

Pure Node.js implementation using only native modules. No supply chain risks, faster installs.

Stream-First

Never buffers entire files in memory. Constant O(1) memory usage regardless of file size.

Plugin Architecture

Micro-kernel design with validators, transformers, and storage adapters. Extend as needed.

Security First

Magic byte verification, CSRF protection, path traversal prevention, atomic writes.

Multi-Storage

Local filesystem, AWS S3, or both simultaneously. Native Signature V4 without aws-sdk.

Observability

Built-in logging, metrics collection, progress tracking, and health checks.

Micro-Kernel Architecture

A minimal core that orchestrates plugins. Each plugin does one thing well.

1

Validators

Check files before processing: size limits, file types, rate limiting, CSRF.

2

Transformers

Process streams: compute checksums, compress, resize images on the fly.

3

Storage

Save files: local disk with atomic writes, S3 with presigned URLs.

pipeline.js
const uploader = new FluxUpload({
  // Validators run first
  validators: [
    new QuotaLimiter({ maxFileSize: 100*MB }),
    new MagicByteDetector(),
    new RateLimiter({ limit: 100 })
  ],

  // Transformers process the stream
  transformers: [
    new StreamHasher({ algorithm: 'sha256' })
  ],

  // Storage saves the file
  storage: new LocalStorage({
    destination: './uploads',
    naming: 'uuid'
  })
});

Built-in Plugins

Everything you need out of the box. Mix and match to build your pipeline.

Validators

  • QuotaLimiter - Size limits
  • MagicByteDetector - Type check
  • ImageDimensionProbe
  • RateLimiter - Throttling
  • CsrfProtection

Transformers

  • StreamHasher - SHA/MD5
  • StreamCompressor - Gzip
  • Custom transformers...

Storage

  • LocalStorage - Atomic writes
  • S3Storage - Native Sig V4
  • SignedUrls - Secure links
  • MinIO, DO Spaces...

Start building today

Install FluxUpload and handle file uploads the right way.

npm install fluxupload