Healthtech exports have an awkward requirement: the browser needs a download, while an auditor needs the original receipt kept private. Short answer: generate the CSV in Express, upload a private object, then return a short-lived signed download URL. That keeps credentials server-side and gives the audit trail a stable object key.
The before/after model is simple. Before, a browser asks an API to stream a file and ends up entangled with CORS, timeouts, and a large response. After, Express writes exports/user-42/2026-09-09/receipts.csv , storage holds the bytes, and the API returns a URL that grants temporary read access. One job, one object, one link.
How should an Express Node.js CSV export reach S3-compatible storage?
Treat the export as a file job, not as a clever response formatter. Build rows from the server-side query, serialize them with a CSV library, and choose a key that carries ownership and date.…