What problem does it solve?
This Skill removes the friction and security risk of uploading user files by providing a consistent, provider-agnostic storage flow that works across memory, local, and R2.
Core Features & Use Cases
- Presigned upload + safe serve: Creates upload and download URLs so the client can PUT bytes directly (with R2 presigning) while the server never handles file contents.
- Provider-agnostic disks: Switches between
memory, local, and r2 via STORAGE_PROVIDER and disk configuration, with consistent keying and URL generation.
- Guardrails and validation: Signs local/memory upload tokens with HS256, enforces modes and max sizes, and validates upload paths to prevent traversal.
Quick Start
Use the storage Skill to upload an avatar from the client by calling the tRPC createUploadUrl mutation, PUTting the file body to the returned URL, then storing the resulting key for later retrieval.