Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

File Upload Handling

  • 427 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

file-upload-handling is a Claude Code backend skill that implements secure multipart uploads, storage wiring, validation, and progress UX for developers adding user file intake to web or API products.

About

file-upload-handling is a backend development skill from aj-geddes/useful-ai-prompts that guides implementation of secure multipart file uploads with storage integration, validation rules, and client progress UX. Developers invoke it when adding avatar uploads, document intake, or media attachments to web apps and REST APIs that must validate file types, enforce size limits, and stream to object storage safely. The skill covers multipart parsing, presigned URL patterns, virus-scan hooks, and frontend progress indicators. Reach for file-upload-handling when building user file intake from scratch rather than tuning an existing CDN pipeline.

  • Multipart and streaming upload patterns
  • Server-side validation and size or MIME limits
  • Storage provider integration and signed URLs
  • Error handling and resumable upload options
  • Security checks for malicious or oversized files

File Upload Handling by the numbers

  • 427 all-time installs (skills.sh)
  • Ranked #1,031 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill file-upload-handling

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs427
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you implement secure multipart file uploads in APIs?

Implement secure multipart uploads, storage wiring, validation, and progress UX when adding user file intake to web or API products.

Who is it for?

Full-stack developers adding user file uploads to web apps or REST APIs who need multipart handling, storage wiring, and validation in one implementation pass.

Skip if: Teams processing only server-generated files or needing specialized streaming media transcoding beyond standard user upload intake.

When should I use this skill?

A developer is adding user file upload functionality and needs multipart parsing, storage integration, validation, and progress UX guidance.

What you get

Multipart upload endpoints, storage integration configs, file validation rules, and progress UX components for user file intake.

  • upload API endpoint
  • storage integration config
  • validation middleware

Files

SKILL.mdMarkdownGitHub ↗

File Upload Handling

Table of Contents

Overview

Build secure and robust file upload systems with validation, sanitization, virus scanning, efficient storage management, CDN integration, and proper file serving mechanisms across different backend frameworks.

When to Use

  • Implementing file upload features
  • Managing user-uploaded documents
  • Storing and serving media files
  • Implementing profile picture uploads
  • Building document management systems
  • Handling bulk file imports

Quick Start

Minimal working example:

# config.py
import os

class Config:
    MAX_CONTENT_LENGTH = 50 * 1024 * 1024  # 50 MB
    UPLOAD_FOLDER = 'uploads'
    ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'docx', 'doc'}
    UPLOAD_DIRECTORY = os.path.join(os.path.dirname(__file__), UPLOAD_FOLDER)

# file_service.py
import os
import mimetypes
import hashlib
import secrets
from werkzeug.utils import secure_filename
from datetime import datetime
import magic
import aiofiles

class FileUploadService:
    def __init__(self, upload_dir, allowed_extensions, max_size=50*1024*1024):
        self.upload_dir = upload_dir
        self.allowed_extensions = allowed_extensions
        self.max_size = max_size
        self.mime = magic.Magic(mime=True)
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Python/Flask File UploadPython/Flask File Upload
Node.js Express File Upload with MulterNode.js Express File Upload with Multer
FastAPI File UploadFastAPI File Upload
S3/Cloud Storage IntegrationS3/Cloud Storage Integration

Best Practices

✅ DO

  • Validate file extensions and MIME types
  • Check file size before processing
  • Use secure filenames to prevent directory traversal
  • Store files outside web root
  • Implement virus scanning
  • Use CDN for file delivery
  • Generate signed URLs for direct access
  • Log file upload/download events
  • Implement access control checks
  • Clean up temporary files

❌ DON'T

  • Trust user-provided filenames
  • Store files in web-accessible directories
  • Allow arbitrary file types
  • Skip virus scanning for uploaded files
  • Expose absolute file paths
  • Allow unlimited file sizes
  • Ignore access control
  • Use predictable file paths
  • Store sensitive metadata in filenames
  • Forget to validate file content

Related skills

How it compares

Pick file-upload-handling over generic API skills when the specific task is end-to-end user file intake with validation and storage wiring.

FAQ

What does file-upload-handling cover for API developers?

file-upload-handling covers secure multipart uploads, storage wiring, file validation, and progress UX for web and API products. Developers get guidance on parsing uploads, connecting object storage, and enforcing type and size limits.

Does file-upload-handling include frontend progress indicators?

file-upload-handling includes client-side upload progress UX patterns alongside backend multipart endpoints. The skill addresses both API intake and the user-facing progress feedback needed for large file uploads.

Backend & APIsbackendintegrationsfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.