File processing in production involves a layered set of concerns across the full pipeline — from ingestion and transformation to storage, access control, and retrieval. Each layer introduces its own security surface and performance constraints that require deliberate handling.
Signed URL strategies, concurrent upload handling, and processing pipelines that operate without blocking server resources are the decisions that have the most durable impact on how the system behaves under real load.
Most products hit a file-related inflection point: profile photos that need resizing and CDN delivery, contracts or invoices generated on demand as PDFs, documents sensitive enough that a public URL is a security problem, uploads large enough that processing inline would block the server, or bulk exports — ZIPs, spreadsheets, branded reports — that need to run as background jobs. Once file handling grows beyond a single upload endpoint, the access layer and the processing pipeline both need deliberate design.
This service covers AWS S3 with CloudFront delivery, signed URL access control with TTL and IAM scoping, image processing via Sharp or ImageMagick, PDF generation with Puppeteer or PDFKit, and async job queues. The focus is on the access layer — signed URLs, scoped permissions, expiry handling — and on processing pipelines that handle concurrent jobs without becoming a bottleneck.
File handling requirements vary significantly by product type. Below are the most common scenarios I build for and the key engineering decisions each one involves.
| Scenario | Stack | Key Consideration |
|---|---|---|
| Secure file access | AWS S3 + CloudFront + signed URLs | TTL management, IAM scoping, URL expiry handling |
| Image processing | Sharp / ImageMagick + Lambda | Resize-on-demand vs pre-generated variants, cost at scale |
| PDF generation | Puppeteer / PDFKit + job queue | Template rendering, font embedding, async job management |
| Multi-file uploads | S3 multipart + progress tracking | Resumable uploads, chunking strategy, client-side progress |
Say hi at hi@levchenkod.com