file-uploads

Implement S3 and Cloudflare R2 uploads with presigned URLs and multipart handling.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/giosuetedeschi-spec/bobu-website --skill file-uploads-giosuetedeschi-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-uploads
Source: https://github.com/giosuetedeschi-spec/bobu-website/tree/main/.claude/skills/file-uploads
Command: npx skills add https://github.com/giosuetedeschi-spec/bobu-website --skill file-uploads-giosuetedeschi-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexities of implementing secure, scalable file upload systems, preventing common vulnerabilities like path traversal and unvalidated file types while optimizing performance for large assets.

Core Features & Use Cases

  • Secure Storage Integration: Provides patterns for S3 and Cloudflare R2 integration.
  • Performance Optimization: Implements presigned URLs and multipart upload strategies to handle large files without blocking the main thread.
  • Security Guardrails: Enforces magic byte validation and strict size limits to prevent malicious uploads.

Quick Start

Use the file-uploads skill to generate a secure presigned URL for a user to upload a profile image to the S3 bucket.

Frequently Asked Questions about file-uploads

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

FAQPage Schema
How do I generate a presigned URL for secure file uploads to S3?

Presigned URLs allow clients to upload files directly to S3 or Cloudflare R2 without proxying through your server. This mechanism optimizes performance by reducing main thread blocking and enabling secure, time-limited cloud storage integration.

What is magic byte validation and why is it needed for file uploads?

Magic byte validation for file uploads verifies the actual binary signature of a file rather than its extension. This security guardrail prevents malicious file types from being uploaded to your cloud storage by ensuring strict content integrity.

How do I handle large file uploads to cloud storage without blocking the main thread?

To handle large file uploads without blocking the main thread, implement multipart upload strategies combined with presigned URLs. This approach splits large assets into smaller parts, optimizing performance for S3 and Cloudflare R2 storage.

Does Cloudflare R2 support the same presigned URL workflows as S3?

Yes, Cloudflare R2 supports presigned URL workflows similarly to S3. Both platforms enable secure, performant direct-to-cloud storage integration, allowing you to generate temporary upload links without routing large files through your server.

How do I prevent path traversal vulnerabilities during filename sanitization?

Preventing path traversal vulnerabilities during filename sanitization requires strict validation rules that strip directory traversal characters from user-provided filenames. This ensures system integrity by containing uploaded files to designated storage paths.