nestjs-file-uploads

Installation
SKILL.md

File Upload Patterns

Priority: P0 (FOUNDATIONAL)

  • Magic Bytes: NEVER trust content-type header or file extension.
  • Tool: Use file-type or mmmagic to verify actual buffer signature.
  • Limits: Set strict limits: { fileSize: 5000000 } (5MB) in Multer config to prevent DoS.

Streaming (Scalability)

  • Memory Warning: Default Multer MemoryStorage crashes servers with large files.
  • Pattern: Use Streaming for any file > 10MB.
  • Library: multer-s3 (direct upload to bucket) or busboy (raw stream processing).
  • Architecture:
  1. Client requests Signed URL from API.
  2. Client uploads directly to S3/GCS (Bypassing API server completely).
  3. Pro Tip: Only approach to scale file uploads infinitely.

Processing

Installs
1
GitHub Stars
521
First Seen
14 days ago
nestjs-file-uploads — hoangnguyen0403/agent-skills-standard