TellWang
Dashboard

Storage

Your Wok includes file storage for images, uploads, and documents — the S3-compatible Supabase Storage API. There's no separate file server to run or scale.

Bucket creation and policy management live in your Wok's Postgres (storage.buckets + storage.objects + RLS). Use the REST API or a connected MCP client; the dashboard can generate a Wok-scoped implementation prompt.

Buckets

Files live in buckets. A bucket can be public (anyone with the link can view) or private (only the signed-in users you allow, using the same rules as your data). Create one and grant access via SQL on the Wok:

bucket.sql
-- Create a public bucket (links work without auth)
insert into storage.buckets (id, name, public)
values ('avatars', 'avatars', true);

-- Create a private bucket + a policy: authenticated users can upload
-- their OWN avatar into avatars/.png
insert into storage.buckets (id, name, public)
values ('docs', 'docs', false);

create policy "own-folder-write" on storage.objects
  for insert to authenticated
  with check (
    bucket_id = 'docs'
    and (storage.foldername(name))[1] = auth.uid()::text
  );

Upload & serve

upload.ts
await tw.storage.from("avatars").upload("alex.png", file);
const { url } = tw.storage.from("avatars").publicUrl("alex.png");

Private files are served through short-lived signed links, so they can't be shared or guessed:

signed.ts
const { data } = await tw.storage.from("docs")
  .createSignedUrl("contract.pdf", 60); // 60s

Backend

Files are stored on the Wok's own disk, not in a shared bucket keyed by path, so one Wok can never address another's objects. Bytes are archived every six hours to storage in a separate availability zone.