Skip to content
aj-geddes avatar

File Upload Handling

Secure file upload handling covering validation, virus scanning, storage management, and efficient file serving.

CCM score
40 of 100
skills.sh installs
487
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the upload path end to end: size and extension checks, MIME validation, secure naming, storage, and download
  • Includes reference guides for Flask, Express with Multer, FastAPI, and S3/cloud storage integration
  • Enforces rules such as storing files outside the web root, using signed URLs, and never trusting user-supplied filenames
  • Designed for backend developers building document, media, or profile picture upload features

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill file-upload-handling -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, Security
First seen
Jun 3, 2026

Questions

What does the file-upload-handling skill do?

The file-upload-handling skill builds secure file upload systems with validation, sanitization, virus scanning, storage management and efficient file serving. It covers file upload features, document storage and file download systems across backend frameworks.

How do I install the file-upload-handling skill?

Run npx -y skills add aj-geddes/useful-ai-prompts --skill file-upload-handling -y in your project. Once installed, file-upload-handling gives the agent guidance on checking extensions, MIME types and file sizes before storing uploads.

Which frameworks does file-upload-handling have reference guides for?

The file-upload-handling skill includes reference guides for Python with Flask, Node.js with Express and Multer, FastAPI, and S3 or cloud storage integration. Each guide holds a detailed implementation for its stack.

Where does file-upload-handling stand in the Backend and APIs category?

The file-upload-handling skill is listed in the Backend and APIs category on Claude Marketplaces, next to entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its focus is secure upload, storage and download handling.

More from aj-geddes/useful-ai-prompts

All 258

Similar to File Upload Handling

More Backend & APIs