Constructive Storage
Complete file upload pipeline using presigned S3 URLs — the client uploads directly to S3/MinIO, never routing file bytes through the GraphQL server.
Use the Storage feature pack through constructive-blocks for tenant-facing bucket and object UI. Its standalone view renders host-supplied resources and actions. Its Console module becomes available only when an explicitly configured endpoint exposes compatible storage-tagged bucket and file tables plus executable operations; an object-store endpoint alone does not prove that contract.
When to Apply
Use this skill when:
- Adding file uploads to a Constructive app
- Configuring buckets (public, private, entity-scoped)
- Working with presigned URLs for upload and download
- Setting MIME type restrictions and file size limits
- Implementing file deduplication
- Using the
@constructive-io/upload-clientlibrary
Architecture
Client GraphQL Server S3/MinIO
| | |
|-- requestUploadUrl() ----->| |
|<-- { uploadUrl, key } -----| |
| | |
|-- PUT uploadUrl + file ----|------------------------>|
| | |
|-- downloadUrl query ------>|-- presigned GET URL ---->|
|<-- signed download URL ----| |
Packages
| Package | Purpose |
|---|---|
graphile-presigned-url-plugin |
requestUploadUrl mutation, downloadUrl computed field |
graphile-bucket-provisioner-plugin |
Auto-provisions S3 buckets on row creation |
graphile-upload-plugin |
GraphQL Upload scalar for stream-based uploads |
@constructive-io/upload-client |
Client orchestrator: hash → requestUploadUrl → PUT |
@constructive-io/bucket-provisioner |
Low-level S3 bucket provisioner (CORS, policies, lifecycle) |
Bucket Types
| Type | is_public |
RLS | Use Case |
|---|---|---|---|
| Public | true |
Minimal | Marketing assets, public images |
| Private | false |
Full | User documents, sensitive files |
| Entity-scoped | false |
Entity membership | Per-org/team file storage |
Entity-scoped buckets are provisioned via has_storage: true on entity types — see constructive-entities.
References
| File | Content |
|---|---|
| client-usage.md | Upload client library usage and patterns |
| graphql-mutations.md | GraphQL mutation reference for uploads |
| server-setup.md | Server-side plugin configuration |
Cross-References
- Entity-scoped storage:
constructive-entities - Storage security policies:
constructive-security - File embedding pipeline:
constructive-agents - Storage feature-pack UI:
constructive-blocks