Banners, additional images, and files upload to Dropbox.

Dropbox file IDs are saved with the article in Supabase.
Banners appear in thumbnails and behind the article title/subtitle.
Additional images and files appear below the article text.
This commit is contained in:
StormRunner06106
2026-09-13 08:58:09 -07:00
parent 206bbbc5ed
commit 6e3779e500
10 changed files with 454 additions and 14 deletions
+11
View File
@@ -25,3 +25,14 @@ alter table public.articles enable row level security;
-- service_role and bypasses RLS; browser roles receive no table privileges.
revoke all on table public.articles from anon, authenticated;
grant select, insert, update, delete on table public.articles to service_role;
-- Upload records also exist before an article is published. The article's banner
-- and attachments JSON include storage='dropbox' and the Dropbox file ID.
create table if not exists public.article_media (
upload_id text primary key check (upload_id ~ '^[a-f0-9]{32}$'),
metadata jsonb not null,
created_at timestamptz not null default now()
);
alter table public.article_media enable row level security;
revoke all on table public.article_media from anon, authenticated;
grant select, insert, update, delete on table public.article_media to service_role;