role-fullstack:file-upload-handling
/role-fullstack:file-upload-handling
Implement file upload flows with presigned URLs (S3, GCS, R2), multipart/tus resumable uploads, Sharp image processing, drag-and-drop UI with progress indicators, server-side MIME validation via magic bytes, virus scanning, and CDN serving. Use when adding profile pictures, document attachments, media galleries, or any user-submitted file feature.
- Author
- rnavarych ↗
- Repository
- alpha-engineer ↗
- Licence
- MIT
- Last repository change
- 24.07.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 24.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Implement file upload flows with presigned URLs (S3, GCS, R2), multipart/tus resumable uploads, Sharp image processing, drag-and-drop UI with progress indicators, server-side MIME validation via magic bytes, virus scanning, and CDN serving. Use when adding profile pictures, document attachments, media galleries, or any user-submitted file feature.
Original author description
Implement file upload flows with presigned URLs (S3, GCS, R2), multipart/tus resumable uploads, Sharp image processing, drag-and-drop UI with progress indicators, server-side MIME validation via magic bytes, virus scanning, and CDN serving. Use when adding profile pictures, document attachments, media galleries, or any user-submitted file feature.
How it works
- When to use
- Core principles
- Reference Files
SKILL.md preview
--- name: role-fullstack:file-upload-handling description: Implement file upload flows with presigned URLs (S3, GCS, R2), multipart/tus resumable uploads, Sharp image processing, drag-and-drop UI with progress indicators, server-side MIME validation via magic bytes, virus scanning, and CDN serving. Use when adding profile pictures, document attachments, media galleries, or any user-submitted file feature. allowed-tools: Read, Grep, Glob, Bash --- # File Upload Handling ## When to use - Implementing profile picture or avatar upload - Building document attachment or media gallery features - Handling bulk file imports or exports - Adding drag-and-drop upload UX with progress feedback - Setting up CDN serving for uploaded assets - Adding virus scanning or strict file type enforcement ## Core principles 1. **Never trust client-reported types** — always validate MIME type server-side by reading magic bytes, not the `Content-Type` header 2. **Presigned URLs over server proxy** — upload directly from client to S3/GCS; never stream file bytes through the application server 3. **Rename to UUIDs** — strip original filenames entirely to prevent path traversal, collisions, and enumeration attacks 4. **Process media asynchronously** — run Sharp resizing and format conversion in BullMQ jobs, not in the request handler 5. **Clean up orphans** — run a periodic job to delete uploads unreferenced in the database; storage costs compound silently ## Reference Files - `references/upload-strategies.md` — strategy selection table (multipart form vs presigned URL vs tus), presigned URL flow steps, AWS SDK v3 code example, progress indicator with XMLHttpRequest, CDN serving with signed URLs and cache headers - `references/validation-security.md` — client-side vs server-side validation responsibilities, magic byte MIME checking, ClamAV/cloud malware scanning, Sharp image processing pipeline, react-dropzone UI patterns, common pitfalls
Files in this package (3)
- SKILL.md 2 KB
- references/upload-strategies.md 2 KB
- references/validation-security.md 2 KB
Versions
The database has no other skills named role-fullstack:file-upload-handling.
Database snapshot: 13.11.2026 · package version d8bfd2fabc78 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100file-storage-uploads
Builds safe file upload, storage and download flows on object storage (presigned URLs, multipart and resumable uploads, size and type limits, magic-byte checks, malware scanning with quarantine, image processing safety, safe serving headers, signed downloads, lifecycle rules).… - 100file-upload-processor
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files."… - 95file-handling
File handling patterns — S3/R2/Vercel Blob storage, PDF generation, CSV/Excel import-export, file streaming, presigned URLs, multipart upload. Use when implementing file uploads to cloud storage, generating documents, processing large files, or building download endpoints. - 100cloud-storage
Cloud object storage integration with AWS S3, Azure Blob Storage, and Google Cloud Storage. Covers presigned URLs, multipart uploads, bucket policies, lifecycle rules, and CDN integration. USE WHEN: user mentions "S3", "blob storage", "cloud storage", "object storage",… - 90backend-file-storage
Use this skill when designing file upload, storage, CDN delivery, or file processing systems. This skill enforces: direct-to-storage uploads via presigned URLs, flat key design with no sensitive data, server-side validation, CDN caching with version hashes. Applies to S3, Azure… - 100file-upload-s3-streaming
Use this skill when handling multipart file uploads, signed presigned URLs, and streaming large files to S3-compatible storage.