role-fullstack:file-upload-handling
/role-fullstack:file-upload-handling
Buduje wysyłanie plików z presigned URL, wznawianiem uploadu, walidacją MIME i skanowaniem wirusów, np. na S3 lub R2.
- Autor
- rnavarych ↗
- Repozytorium
- alpha-engineer ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 24.07.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 24.07.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje wysyłanie plików z presigned URL, wznawianiem uploadu, walidacją MIME i skanowaniem wirusów, np. na S3 lub R2.
Oryginalny opis (EN)
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.
Jak działa
- When to use
- Core principles
- Reference Files
Podgląd SKILL.md
--- 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
Pliki w paczce (3)
- SKILL.md 2 KB
- references/upload-strategies.md 2 KB
- references/validation-security.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie role-fullstack:file-upload-handling.
Migawka bazy z 13.11.2026 · wersja paczki d8bfd2fabc78 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100file-storage-uploads
Buduje bezpieczne wysyłanie i pobieranie plików w pamięci obiektowej: podpisane adresy, limity, kontrolę typu i skanowanie wirusów. - 100file-upload-processor
Buduje przesyłanie plików w aplikacji webowej: punkty końcowe, walidację typu, rozmiaru i magic bytes, integrację z chmurą i śledzenie statusu. - 95file-handling
Opisuje obsługę plików: przechowywanie w S3, R2 i Vercel Blob, generowanie PDF, import i eksport CSV i Excel, streaming, presigned URL i multipart upload. - 100cloud-storage
Integruje chmurowy object storage AWS S3, Azure Blob Storage i Google Cloud Storage: presigned URLs, multipart uploads, polityki bucketów, reguły cyklu życia i CDN. - 90backend-file-storage
Projektuje przesyłanie i przechowywanie plików w S3, Azure Blob lub GCS: podpisane adresy URL, walidację po stronie serwera i cache CDN. - 100file-upload-s3-streaming
Obsługuje wieloczęściowe wysyłanie dużych plików, podpisane adresy presigned i strumieniowanie do magazynu zgodnego z S3.