NestJS · Senior · Question 44 of 75
How do you safely handle file uploads at scale in Nest?
- ✓Correct answer: Limit size and type, avoid buffering big files in memory, stream to object storage or use presigned URLs so clients upload directly
- 2Accept any file type and size
- 3Store every upload in memory as a Buffer
Explanation
Presigned uploads move heavy traffic away from the API; the API only records metadata and verifies the result.