Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    ngxtm

    nestjs-file-uploads

    ngxtm/nestjs-file-uploads
    Security
    1 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Secure file handling, Validation, and S3 streaming.

    SKILL.md

    File Upload Patterns

    Security (Input Validation)

    • Magic Bytes: NEVER trust content-type header or file extension.
      • Tool: Use file-type or mmmagic to verify the 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: This is the only way to scale file uploads infinitely.

    Processing

    • Async: Don't process images/videos in the HTTP Request.
    • Flow:
      1. Upload file.
      2. Push FileUploadedEvent to Queue (BullMQ).
      3. Worker downloads, resizes/converts, and re-uploads.
    Recommended Servers
    Google Drive
    Google Drive
    Repository
    ngxtm/devkit
    Files