file-upload-handling

Validate file uploads with type checks, size limits, and malware scanning.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/PrasadTelasula/EvokeQOne --skill file-upload-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-upload-handling
Source: https://github.com/PrasadTelasula/EvokeQOne/tree/main/.claude/skills/file-upload-handling
Command: npx skills add https://github.com/PrasadTelasula/EvokeQOne --skill file-upload-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-magic, aiofiles, python-multipart.

What problem does it solve?

Provides secure file upload handling with validation, size limits, type checking, virus scanning (optional), and UUID-based naming.

Core Features & Use Cases

  • Type and size validation and MIME checks
  • Secure storage with UUID filenames
  • Optional virus scanning integration
  • Access control and path traversal protection

Quick Start

Use the upload endpoints (profile/resource) to handle images and documents with configured size limits.

Frequently Asked Questions about file-upload-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely handle file uploads with validation and virus scanning?

Secure file uploads by validating content type, enforcing size limits, scanning for malware, and storing files with UUID-based naming outside the web root. This prevents unauthorized access, path traversal attacks, and malicious file execution while supporting images, documents, and videos across multiple upload endpoints.

What validation checks should I implement for file uploads?

File upload validation includes MIME type verification, strict content type checking, maximum size constraints, and optional malware scanning. These checks together prevent type confusion attacks, oversized requests, and infected files from reaching your storage system.

Can I use file uploads for profile photos, documents, and resource assets?

Yes, this approach handles profile photos, documents, and resource assets with type-specific validation and size limits. It also generates thumbnails for images and stores each file type in separate subfolders with UUID-based names for organization and security.

Why should uploaded files use UUID-based naming instead of original filenames?

UUID-based naming prevents filename collisions, protects user privacy by obscuring original filenames, eliminates path traversal vulnerabilities from user-supplied names, and ensures unique storage across concurrent uploads. Combined with non-web-root deployment, this hardens security against direct file access attacks.

What dependencies do I need for secure file upload handling?

Core dependencies include python-magic for MIME type detection, aiofiles for async file operations, and python-multipart for parsing multipart form data. Together they enable type validation, concurrent uploads, and efficient file processing in Python backends.

How do I prevent malware and unauthorized file types from being uploaded?

Combine MIME verification via python-magic, strict type validation against an allowlist, size limits to prevent resource exhaustion, and optional virus scanning integration. This layered approach blocks both known malware signatures and unexpected file formats before storage.